发生回发时,文本框值会丢失. [英] Text box values lost when post back occurs.

查看:85
本文介绍了发生回发时,文本框值会丢失.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在使用向导进入控件.我在页面中有三个控件.这里的问题是我移至下一步并返回后无法检索文本框控件的值.我猜这些值在回发时会丢失.我尝试了更新面板,viewstate等,但结果否定.


Hi,
I am using wizard to step into the controls. i am having three controls in a page. here the problem is i am unable to retrive the values of textbox controls after i move to next step and return.I guess the values are lost while postback occurs. i tried update panel,viewstate etc., but results negative.


can any one help me to fix the issue?

推荐答案

当然,离开页面后,您会丢失所有值.您必须使用POST的GET方法将它们发送到下一页,然后在返回时返回到初始页面.

如果每次执行此操作时都不这样做,那么您将拥有一个空的页面,因为会生成一个新的页面类空实例.


在此处了解更多信息:
http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx#Y912 [^ ]


-
签名:
东正教信仰多大了?
http://www.orthodoxphotos.com/history.shtml [
Ofcourse you loose all the values after you leave the page. You must send them over to the next page and then back to the initial page when you return, using either GET of POST methods.

If you don''t do that each time you return to the page you have an empty one, because a new empty instance of the page class in generated.


Read more here:
http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx#Y912[^]


--
Signature:
How old is the Orthodox Faith?
http://www.orthodoxphotos.com/history.shtml[^]

.


这篇关于发生回发时,文本框值会丢失.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆