Data Binding Series

So what is databinding? It’s a technique to fill a Asp Control with values from a source. This source could be an XML, or a database. Why would you want that? To create dynamic websites ofcourse!
With data binding techniques, you can separate the way you make data visible, and the actual data.
An overview of all the post in this series, you can find by tag.

You will be able to download the examples. They will all be in the 7ZIP format. In my opinion it’s the best archiving method, and it’s opensource. Check out the 7zip website if you are not able to open it.

Possibilities for the different Data Bind Controls

Repeater DataList GridView
Templates X X
Styles X
Columns X
Select Items X

Read the rest of this entry »

Add hyperlink to the Bulleted List Control

This will be a very short tutorial, but still I couldn’t find any information relevant to the search: How to add hyper link to the bulleted list control.

Nevertheless this is pretty easy. We assume you want to do this in your Code-behind File, so you can add hyperlink in a list dynamically.

First create the BulletedList control, then you have to set his mode to hyperlink.

BulletedList BL = new BulletedList();
BL.DisplayMode = BulletedListDisplayMode.HyperLink;

Now that we have the control,the next code is how to add the hyperlinks. I will show how to add one. With a simple iteration you can add more, the way you might want it.

item.Text = “The text of the link”;
item.Value = “the-url.aspx”;
BL.Items.Add(item);

Good luck with your project!

Add items to the Bulleted List Control (in the code file)

My next tutorial will be a really short one. But still I have spent a really long time to find what I was looking. Maybe because it was way to easy?

I wanted to generate a BulletedList Web Control, in my code file. Inside a for-loop I wanted to add texts to my list.

Read the rest of this entry »