code example for placeholder/user control and viewstate problem

I

ItNerd

I am using a placeholder in my aspx page for a control (ascx in a
separate file). I cannot capture the value of the dropdownlist on
postback in the control because according to what I read, the viewstate
is in a "special place" and is being overwritten. Please please tell me
how to access this special place!!!???!! Thank you.



I am using C#, by the way.

P.S. I have read several explanations that talk about the order of
processing but I REALLY REALLY need to see a piece of code.
 
T

terrorix

ItNerd said:
I am using a placeholder in my aspx page for a control (ascx in a separate file). I cannot capture the value of the dropdownlist on postback in the control because according to what I read, the viewstate is in a "special place" and is being overwritten. Please please tell me how to access this special place!!!???!! Thank you.



I am using C#, by the way.

P.S. I have read several explanations that talk about the order of processing but I REALLY REALLY need to see a piece of code.


Are you loading user control in Page_Load? If yes then move this loading code to Page_Init to enable ViewState of user control which was loaded dynamically to placeholder.
 
S

shark

terrorix said:
ItNerd wrote:





Are you loading user control in Page_Load? If yes then move this loading code to Page_Init to enable ViewState of user control which was loaded dynamically to placeholder.


THANKS!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top