[英]how to transfer value from one page and display it into next page's label using server.execute navigator
I'm passing the value to the next page using server.execute, but I'm unable to get that value into next page. 我正在使用server.execute将值传递到下一页,但无法将该值传递到下一页。
//this is WebForm1.aspx.cs
protected void Button1_Click(object sender, EventArgs e)
{
Server.Execute("WebForm2.aspx");
}
//this is WebForm2.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = //what method should i use to get the vale from WebForm1.aspx.cs
}
Edit : 编辑:
On page1 (Button click etc) : Server.Execute("page2.aspx?v=" + YourEncryptFunction(TextBox1.Text));
在第1页上(单击按钮等):
Server.Execute("page2.aspx?v=" + YourEncryptFunction(TextBox1.Text));
On page2 (Page_Load) : TextBox1.Text = YourDecRyptFunction(Request.QueryString[0]);
在第2页(Page_Load)上:
TextBox1.Text = YourDecRyptFunction(Request.QueryString[0]);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.