Ask a Question related to ASP.NET General, Design and Development.
-
Joe Glover #1
Re: please help with dynamic user controls
Hi Suzanne
I agree. If you ever want to add controls dynamically to a page and have> I think it
> may be because, since I don't load the user controls until the page load,
> the viewstate holding the datagrid information is discarded because the
> control is not yet loaded.
them track their viewstate, you need to create them during the Page_Init
event (this is the only chance you get before the viewstate is
deserialized). However, this will cause you problems as you're making a
decision based on something retrieved from the viewstate; clearly this won't
be available to you during the Init event.
Perhaps it would be worth 'hardwiring' the decision making logic for now
rather that accessing the viewstate. Then you can perform this and the
control generation during the Page_Init and check that everything works the
way you want.
Does this help at all?
Joe
Joe Glover Guest
-
Events in dynamic user controls in ASP 2.0
I am trying to load x number of the exact same user control on the page. I added the event handling in the user control code. The problem I have... -
Dynamic User Controls
Hello, I have a page with user controls 1,2,3. 1-will always load in the page 2 or 3 will load depending on the action that is taken in 1. ... -
Clearing viewstate for dynamic user controls
I have a form that dynamicaly loads user controls based on user postbacks. Everything works well except that the framework seems to want to match... -
Dynamic User Controls Event Handling
In my web form to the place holder i'm loading different User Controls depends on some conditions for the user control which is loaded first time... -
Dynamic User Controls Event Handling Problem
I've three user control 1,2 in the web form i had a place holder control to that place holder i'm loading either 1 or 2 depending on some...



Reply With Quote

