Page Load event
Hi,
I have this weird problem. In one of the applications that I am developing the page load event is being fired twice. First when the page is loading and then at unloading. This is causing me a lot of trouble. The code for one of the pages is given below. Does anyone have any ideas about why this is happenning?
Thanks in advance.
Qadeer.
Code
-----------------------------------------------------------------
public class Step1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label lbl1;
protected System.Web.UI.WebControls.TextBox txt1;
protected System.Web.UI.WebControls.CheckBox checkbox1;
protected System.Web.UI.WebControls.Label lbl2;
protected System.Web.UI.WebControls.TextBox txt2;
protected System.Web.UI.WebControls.Button btn2;
protected System.Web.UI.WebControls.CheckBox checkbox2;
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btn2.Click += new System.EventHandler(this.btn2_Click);
this.Unload += new System.EventHandler(this.Page_Unload);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void Page_Load(object sender, System.EventArgs e)...
private void Page_Unload(object sender, System.EventArgs e)...
private void btn2_Click(object sender, System.EventArgs e)...
----------------------------------------------------------------
|