url回发期间丢失的信息 [英] information lost during post back of url
本文介绍了url回发期间丢失的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在回发url期间保存信息.
How to save information during postback of url.
推荐答案
好吧,您可以使用ViewState
Hi ,
Well you can useViewState
Viewstate.Add( "MyViewState", "test" );
if( Viewstate["MyViewState"]!=null)
{
string MyData = Viewstate["MyViewState"].ToString();
}
检查此链接
初学者查看状态指南 [ http://msdn.microsoft.com/en-us/library/ms972976.aspx [ ^ ]
ViewState [
Check this links
Beginner''s Guide To View State [^]
http://msdn.microsoft.com/en-us/library/ms972976.aspx[^]
ViewState [^]
Best Regards
M.Mitwalli
尝试启用控件的ViewState
属性,否则在回发页面之前,先将页面数据保存在Session
或ViewState
中,然后将控件重新绑定到IsPostBack
Page_Load
功能的说明.
--Amit
Try enablingViewState
property of your controls or otherwise before postback of your page save the page data inSession
orViewState
and rebind your controls inIsPostBack
of yourPage_Load
function.
--Amit
hii,
在asp.net中使用状态管理
以下链接将为您提供帮助
http://msdn.microsoft.com/en-us/library/75x4ha6s%28v = vs.100%29.aspx [ ^ ]
初学者ASP.NET中的状态管理技术简介 [ ^ ]
hii,
use State management in asp.net
Following link will help you
http://msdn.microsoft.com/en-us/library/75x4ha6s%28v=vs.100%29.aspx[^]
Beginners Introduction to State Management Techniques in ASP.NET[^]
这篇关于url回发期间丢失的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文