第一种方法:
通过URL链接地址传递Request.QueryString
send.aspx:
   protected void Button1_Click(object sender, EventArgs e)
     {
         Request.Redirect("Default2.aspx?username=honge");
     }
     
receive.aspx:
string username = Request.QueryString["username"];这样可以得到参数值。

第二种方法:
通过post方式Request。
send.aspx
<form ]来实现.

第六种方法:
通过Cookie
方法类似Session。

第七种方法:
通过Viewstate
Viewstate使用简单,缺点是只能够在同一个页面使用,在ASP.NET2.0里这个问题可以使用Button的PostBackUrl进行解决。

第八种方法:
通过Cache
Cache通常用于缓存服务端某些不常变动的数据。
使用Cache存储数据的场合虽然不多,但是毕竟也是一种手段,另外,在使用Cache存储DataSet时,其实还是引用而不是内容的拷贝。

相关文章: