SendValues.aspx: txtFromValue->TextBox
WebRecieve.aspx: txtRecieve->TextBox
1: Session
Send Page:
Session["Name"]=this.txtFromValue.Text;
Server.Transfer("WebRecieve.aspx");
Receive Page:
this.txtRecieve.Text=Session["Name"].ToString();
2: Application
Send Page:
Application["strID"]=this.txtFromValue.Text;
Server.Transfer("WebRecieve.aspx");
Receive Page:
this.txtRecieve.Text=(string)Application["strID"];
3: Request
Send Page:
public int strID=0;
int intNUm =int.Parse (this.txtFromValue.Text)*1;
Server.Transfer("WebRecieve.aspx?strID="+intNUm);
Receive Page:
this.txtRecieve.Text=Request["strID"].ToString();
this.txtRecieve.Text=Request.Params["strID"].ToString();
this.txtRecieve.Text=Request.QueryString["strID"];
4 :static
Send Page:
public static string strTest="";
strTest=this.txtFromValue.Text;
Server.Transfer("WebRecieve.aspx");
Receive Page:
using SendValues;
this.txtRecieve.Text=WebForm1.strTest;
5: public get Access Method
Send Page:
public string Gettext
{
get
{
return this.txtFromValue.Text;
}
}
Receive Page:
WebForm1 wf=(WebForm1)Context.Handler;
this.txtRecieve.Text=wf.Gettext;