How to Check all Checkboxes without PostBack
Author: DevASP Team
Download Source Code : 685_GridViewCheckBox.zip
In this article I will try to explain you how you can add javascript on Page_PreRender event. This will help full in scenarios where you don’t want to postback your page and page will work with server
To begin with this application, create a new application in asp.net 2.0 and drop grid view control on your page. Now add the following code on page load event:
In above code the main thing you will see is I have registered the Pre_Render event on page load now add the following code on your page:
Here RegisterStartupScript will register your script on your browser page.