如何使用 server.execute 导航器从一个页面传输值并将其显示到下一页的标签中



我使用server.ecute将值传递给下一页,但是我无法将该值纳入下一页。

//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
       }

编辑:

在第1页上(按钮单击等(: Server.Execute("page2.aspx?v=" + YourEncryptFunction(TextBox1.Text));

on Page2(page_load(: TextBox1.Text = YourDecRyptFunction(Request.QueryString[0]);

相关内容

最新更新