L
localhost
In my ASP.NET page code-behind, I have added a textbox like this:
(C#)
System.Web.UI.HtmlControls.HtmlGenericControl div1= new
HtmlGenericControl( "div" );
div1.ID = "divNewTextBox";
TextBox txt1 = new TextBox();
div1.Controls.Add( txt1 );
Now I want to add the TextChanged event to the textbox as early as
possible so on a PostBack the wired-up event can fire. I think I need
to add the div and textbox before Page_Load, because by then ViewState
is already processed, is that correct?
(C#)
System.Web.UI.HtmlControls.HtmlGenericControl div1= new
HtmlGenericControl( "div" );
div1.ID = "divNewTextBox";
TextBox txt1 = new TextBox();
div1.Controls.Add( txt1 );
Now I want to add the TextChanged event to the textbox as early as
possible so on a PostBack the wired-up event can fire. I think I need
to add the div and textbox before Page_Load, because by then ViewState
is already processed, is that correct?