User control updatepanel not updating

01 Feb

Rendering a 10 forms and keeping them hidden isn't a big deal, but running 10 queries that the user never wants to see is, otherwise I'd stick to that method, its works perfectly. So the problem really is in relation to the controls being initialized fully prior to loading and using them.Since we have a variety of controls we can be loading in depending on what was clicked, my end result will likely involve me setting the class property along with the control path for loading.

Net Question Answer site, specially started to allow visitors of this site ask their doubts and queries. Just click the Ask Now button and ask your question now.

Viewstate does not seem to be working in this case. It visually loads the user control, but does not programmatically register it's controls or events. Good suggestion, I have tried that, but it makes no difference whether the Update Panel is in the user control because even if it was the page wouldn't know it. I just looked over the code posted in the original post and I realized that the original-poster is using the Load Control method in the Page Load event. If your dynamic control was a Text Box, the text that the user entered into the Text Box is loaded into the Server Side Text Box object when the View State is loaded for this dynamic Text Box happens.

(uses the same user control as the previous example) Default.aspx: To solve this postback problem, one would naturally want to use an Update Panel, like the following example. It visually loads the user control, but does not programmatically register it's controls or events. It seems to me that because you register a control with the page, and because the page is only rendered once, you might have an impossible task at hand....unless you do a postback to register the control with the page, but you don't want to do that. It seems to me that because you register a control with the page, and because the page is only rendered once, you might have an impossible task at hand....unless you do a postback to register the control with the page, but you don't want to do that. I can't believe that AJAX has such a gaping hole in it, otherwise it's really an incomplete framework. The user control has an updatepanel containing a datalist. The Add link works great, but the "Remove" link tied to the datalist does not. Likewise, if you have a dynamic button and the user clicks the button, the button click event is detected when the View State is loaded for the button control.

One way to accomplish this is to perform the following steps: If you follow the above steps you can then refresh the Update Panel by running the Java Script code created in step 4.

While the above steps certainly work, having to add a hidden Button control seems like a bit of a hack.