Understanding this simple difference between the two methods can save you hours of work! NET AJAX Update Panel, then you cannot use the Client Script. Register Startup Script to call a Java Script function during a partial-page postback. The Grid View control is the successor to the Data Grid and extends it in a number of ways.With this Grid View control, you could display an entire collection of data, easily add sorting and paging, and perform inline editing.In this article we create a Gridview from database and add some additional operations such a add, edit and delete data in the Grid View control.
For demonstration I have created a database (named Database.mdf) in which we have a table named tbl_Employee.
Had we used the 'Register Client Script Block', the browser would have executed the Java Script before the text box is on the page.
Therefore, the Java Script would not have been able to find a ‘txt Master’ and would give a control not found error.
Note: I'm using stored procedure to update my DB table.
To manually specify columns for the gridview you have to set Auto Generate Columns="false".