Page Loading Problems

Hknc

New Member
I am new to ASP.NET, but from what I understand of Page_Load and IsPostBack, when i handle a button click event, which sets an asp:Label to the value of a TextBox's text, on a form, IsPostBack = true. The Page "refreshes" inserting the TextBox.Text into the Label.Text (as handled) and the page is rerendered. However, the page is not showing the changed Label and I am sure the Event is handled, due to debug traces. <BR><BR>I am hoping that this is a code logic error on my part and not, say, an I.E. issue, but so far, neither my father nor i has been able to find the error.... Any help would be greatly appreciated. <BR><BR>The code looks like, as follows:<BR><BR>private void Page_Load (object sender, System.EventArgs e){<BR> Label1.Text = "Customer ID";<BR><BR> if (IsPostBack == false) {<BR> Label2.Text = "Waiting...";<BR> } // end if<BR> else {<BR> Label2.Text = "Processing...";<BR> } // end<BR>} // end Page_Load<BR><BR>public void Search_Click(object sender, System.EventArgs e) {<BR> Label3.Text = TextBox1.Text; <BR><BR> Debug.WriteLine(TextBox1.Text);<BR> Trace.Write(TextBox1.Text);<BR>} //end Search_ClickPut a break point @ Search_Click() and step throught the code. What happens?
 
Back
Top