469,955 Members | 2,494 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,955 developers. It's quick & easy.

User Control not getting postback data

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.
Nov 17 '05 #1
2 3218
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
"Duwayne" <dm**@yahoo.com> wrote in message
news:61**************************@posting.google.c om...
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.

Nov 17 '05 #2
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.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by moondaddy | last post: by
1 post views Thread by Robert Howells | last post: by
3 posts views Thread by Tim::.. | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.