Gridview rowupdating event handler
There can be several approaches taken for validating data. For our example we are going to use Customers table of Northwind database. Open its smart tag and choose "Configure Data Source" option to start Configure Data Source wizard.
On the first step of the wizard click on "New Connection" button to open a dialog as shown in Figure 1.
The above piece of code will also do the same as label in Item Template and Textbox in the Edit Item Template.
For this sample to work, you must install the Sql Server 2008 R2 Express.
This sample contains a Sql Server database file, if you do not install Sql Server, The Data In page can also works fine.