S
Simon Harvey
Hi All.
In one of my user controls I add a textbox to a placeholder sitting on the
user control.
txtUsername = new TextBox();
txtUsername.ID = "txtUsername";
phUsernamePlaceholder.Controls.Add(txtUsername);
Then in an event handler for the pages save changes button I try to find the
control via:
TextBox = ((Textbox)this.FindControl("txtUsername")).Text;
Unfortunately, this isn't working - it can't find the control.
Can anyone tell me where my control has gone?
Thanks all!
Simon
In one of my user controls I add a textbox to a placeholder sitting on the
user control.
txtUsername = new TextBox();
txtUsername.ID = "txtUsername";
phUsernamePlaceholder.Controls.Add(txtUsername);
Then in an event handler for the pages save changes button I try to find the
control via:
TextBox = ((Textbox)this.FindControl("txtUsername")).Text;
Unfortunately, this isn't working - it can't find the control.
Can anyone tell me where my control has gone?
Thanks all!
Simon