UserControl Losing state

S

shoeb

I am having problem maintaining state of user control .
I am loading then dynamically.
here's the code
-----------
System.Web.UI.WebControls.PlaceHolder phAD;
AttributeDetail ucAttributeDetail;

ucAD= (AttributeDetail)LoadControl
("AttributeDetail.ascx");
phAD.Controls.Add(ucAD);
----------

during postback am not able to maintain state of my user
control
am I missing something
Please help
please cc it to (e-mail address removed)

Thanks
 
T

Teemu Keiski

Hi,

do you load and add the UC on postback as you do on initial load? And do you
do it at or before Page_Load?
 
S

shoeb

Hi, I load it on init method irrespective of its postback
or not, but its not helping.
Please guys help me on this its getting mission critical

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
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top