Saturday, 15 March 2014

how to data binding in C#?

simple data binding using TextBox 


step 1:- Let us take up a small example to understand databinding concept. create one application with SqlDataSource control on it.

Choosing a data source for the bulleted list control involves:
  • Selecting  the data source control.
  • Selecting field to display which is called data field.
  • Selecting field for the value.



When run the application , check that the entire title column is bound to the bulleted list and displayed.


Step 2: Create a new application Add a class name  by right clicking on the solution name in the Solution Explorer and  choosing the item 'class' from the 'Add item' dialog box.




  The source file should look as the following:





   Output:


0 comments:

Post a Comment