Click here to Skip to main content
15,896,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello
I have created one user control and added it into my asp pages. I am adding this page dynamically on button click. But i can't able to add more than, because once postback occur it remove the previously added control.
I don't know how to preserve the state of user control on postback. Please help me.

Thanks & Regard
Rajiv Kumar
Posted

1 solution

Just go through ViewState .Follow this link

http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx[^]
 
Share this answer
 
Comments
Tech Code Freak 26-Sep-11 4:09am    
Exactly! ViewState is what helps preserve controls' state. My 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900