User Control not getting postback data

  • Thread starter Thread starter Duwayne
  • Start date Start date
D

Duwayne

I am having lots of trouble with one of my user controls (ascx) not
automatically loading postback data. An image on the aspx page starts
the postback and the parent has no problem loading it's own
information, but when it comes to loading the data for the user
control, nothing loads. From my understanding, during postback, the
user control should reload the new information based on the postback.
Some information:

The aspx dynamically loads the ascx pages based on postback data. when
an ascx is loaded, it should first load information from the db. The
user inputs new information into the form and clicks an image in the
aspx page and triggers the postback. Please give me some pointers.
Thanks.
 
Duwayne,

If user controls are dynamically loaded on a page they need to be loaded
again in order to utilize the postback data.

I have an example of how to do this on my website, www.aboutfortunate.com.
Which, by the way, uses this technique itself. Just go to the code library
and search for: "load user control dynamically" or something similar.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Thanks for the quick reply. I do use that snipped of code in my aspx
page. I use it during page load to dynamically load the proper ascx
file. But, the problem lies during postback, where the ascx loads the
default values, instead of the values from the postback. I thought it
should load the values from the postback and automatically fill up the
controls in the ascx, so I can do futher processing.
 
Back
Top