Professional Web Applications Themes

User Control not getting postback data - ASP.NET General

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

  1. #1

    Default 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.
    Duwayne Guest

  2. #2

    Default 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" <com> wrote in message
    news:google.com... 


    S. Guest

  3. #3

    Default 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!
    Duwayne Guest

Similar Threads

  1. How do I do a postback to a user control?
    By Arne in forum ASP.NET Building Controls
    Replies: 3
    Last Post: September 22nd, 03:28 PM
  2. dropdownlist postback to user control
    By DC Gringo in forum ASP.NET Building Controls
    Replies: 1
    Last Post: April 14th, 04:09 AM
  3. Getting PostBack Data from DropDownList Control
    By Lance in forum ASP.NET Building Controls
    Replies: 2
    Last Post: December 5th, 01:16 AM
  4. sorting composite control data on postback
    By Aaron Prohaska in forum ASP.NET Building Controls
    Replies: 0
    Last Post: November 6th, 12:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139