LoadControl() problem

G

Guest

When I load a UserControl in dynamically using LoadControl(), I have a
problem where the values from input controls (like the textbox) will not be
populated into the control in the codebehind.
For example, if I type a string, eg "Hello" into the textbox,then submit, at
Page_Load() the Textbox.Text value is an empty string. However the value
"Hello" is sitting in the Forms collection of the Request object.
I don't have this problem if the UserControl is statically declared in an
aspx page using the <%@ Register %> directive.
Any ideas?
 

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

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top