ASP.NET实现页面间值传递的几种方法介绍

  第一种方法:

  通过URL链接地址传递

 send.aspx:
  protected void Button1_Click(object sender, EventArgs e)
    {
        Request.Redirect("Default2.aspx?username=honge");
    }
 receive.aspx:
 string username = Request.QueryString["username"];这样可以得到参数值。
 

  第二种方法:

  通过post方式。

send.aspx

   
参考:[http://www.crazycoder.cn/]
       

Tags: 

延伸阅读

最新评论

发表评论