WebControls and Page_Load about Events (TextChanged)

J

jorge

Hello all,

Why is it that:
I have a WebForm and on Page_Load:
Control ctrl = LoadControl("WebUserControl1.ascx");
PlaceHolder1.Controls.Add(ctrl);

And a WebUserControl that contains a TextBox

I have to wait until the TextChanged event fires on the
webusercontrol to retrieve the textbox text property

How can I retrieve the value of the textbox before that
event fires?

This is an issue because i add the textboxes dynamicly
and can not have the handling of the textboxes on the
usercontrol.

Thanks.
/ jorge
 
B

bruce barker

because you add them after the loaddata event has fired, move your code to
oninit

-- bruce (sqlwork.com)
 
J

jorge

Works like a charm...
Thanks.
-----Original Message-----
because you add them after the loaddata event has fired, move your code to
oninit

-- bruce (sqlwork.com)





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top