User Control not getting postback data

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.
 
S

S. Justin Gengo

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
 
D

Duwayne Sy

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.
 

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

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,829
Latest member
PIXThurman

Latest Threads

Top