Response对象的Redirect方法重定向的功能.并向重定向的url传递参数

xiaoxiao2026-03-16  6

    protected void Button1_Click(object sender, EventArgs e)  //A页面    {        //Response对象的Redirect方法重定向的功能.并向重定向的url传递参数        string name = txtname.Text.Trim();        string sex = "先生";        if (RadioButton2.Checked)            sex = "小姐";        Response.Redirect("Welcome.aspx?Name="+name+"&Sex="+sex);    }

 

 

 

 

   protected void Page_Load(object sender, EventArgs e)   //B页面    {        string name=Request .Params["Name"];        string sex=Request .Params["Sex"];        Response.Write("欢迎"+name+sex+"!");    }

相关资源:敏捷开发V1.0.pptx
转载请注明原文地址: https://www.6miu.com/read-5046006.html

最新回复(0)