Thursday 9 August 2012

How to bind Listbox using Dataset

Below Is the ListBox markup in script.


And see the below C# code for data bind. Here LoadContact() is the method I am using for binding the ListBox.


Now need to call LoadContact() from page_Load(). See the code below.



Note: The code is getting Connection String from web.config. So below is the example of Connection String in web.config.

 

And Here we Go


No comments: