indexpage.aspx Page<form runat="Server"> <div> <input id="Text1"Type="text"runat="Server"/> <input id="Text2"Type="text"runat="Server"/> <input id="Button1"Value="Pass Value"Type="Button"runat="Server"onserverclick="Ok_serverclick"/> </div></form>IndexPage.aspx.cs Background code: Public voidOk_serverclick (Objectsender, EventArgs e) {application["Name"] =Text1.value; application["Pass"] =Text2.value; Response.Redirect ("resultindex.aspx"); }resultpage.aspx.cs Background code:protected voidPage_Load (Objectsender, EventArgs e) {The Application object is scoped to the entire global, which means it is valid for all users.} Its common methods are with Lock and unlock, Application.Lock (); stringName = application["Name"]. ToString (); stringpass = application["Pass"]. ToString (); Txt. Value= name +"——————"+Pass; Application.UnLock (); }
Reference documents:
Http://www.cnblogs.com/liukemng/archive/2010/12/04/1895966.html
Http://www.cnblogs.com/xiaoyusmile/archive/2012/03/20/2408797.html
Http://www.cnblogs.com/mahaisong/archive/2011/05/23/2054327.html
Asp. NET Learning Page Pass value (8) _application pass Value