User Control not getting postback data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Duwayne

    #1

    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.
  • S. Justin Gengo

    #2
    Re: User Control not getting postback data

    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" <dmsy@yahoo.com > wrote in message
    news:617da882.0 308191726.79a5e bc4@posting.goo gle.com...[color=blue]
    > 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.[/color]


    Comment

    • Duwayne Sy

      #3
      Re: User Control not getting postback data

      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!

      Comment

      Working...