I've a sample below, the Grid View Template is bound to Category Name.
Introduction The Grid View control displays the values of a data source in a table.
Nor does it represent the opinion of my dog, because I don’t have one.
Save all or press "Ctrl S" and hit "F5" to run the page, the page will look as in the following image: Click on "Edit the Grid View", it will display Textboxes in each cell as in the following image: Edit the value(s) here and click on the Update link, it will update all the data or to remove it click on the "Delete" link above the image shown.
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.