回发期间如何保留用户控制 [英] how to preserve user control during postback
本文介绍了回发期间如何保留用户控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
我创建了一个用户控件,并将其添加到我的asp页面中.我将在单击按钮时动态添加此页面.但是我不能添加更多,因为一旦发生回发,它将删除先前添加的控件.
我不知道如何在回发时保留用户控件的状态.请帮帮我.
谢谢与问候
Rajiv Kumar
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
推荐答案
只需通过ViewState.关注此链接
http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx [ ^ ]
Just go through ViewState .Follow this link
http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx[^]
这篇关于回发期间如何保留用户控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文