Asp.net| Program
The Page_Load event for an ASPX page in asp.net has two strange places to remember:
A. Sometimes Page_Load events occur more than once in your ASP.net page. One possible reason for this happening is that you set the Autoevenwireup value of the ASPX page to True. If so, it is not necessary to add the "System.EventArgs Handles" line after the Sub Page_Load (ByVal Sender as System.object,byval e as MyBase.Load). Since Visual Studio.NET can automatically handle this part for you, you can of course set the AutoEventWireup value to False.
B. Sometimes it's like a button click event handling code is not running. Here you should check the Page_Load event to ensure that any code that loads the data (for example, the code that binds the data in the Drop-down list) runs only when the page is initially loaded, not when the client data is returned later. A simple way to check this is to add a test to the Page.IsPostBack value in your Page_Load event handler-false means that this is the first time the page is loaded and true means that a data return process has occurred.