asp.net 间传值的方法

1.页面间使用post请求时,可以使用Request.Form["xxx"]

2.QueryString

3.Context上下文传值,使用在Server.Transfer中,这个方法是同一个请求,不能使用在reponse.Redirect方法,该方法产生了一个新的请求

   Context.Items["xxx"]

4.cookie

   HttpCookie cookie = new HttpCookie("key",value);

   Response.Cookies.add(cookie);

5.Session

  可以使用在同一个session中,redirect可以使用

6.Application 应用程序域共同使用,尽量少用

 

posted @ 2015-06-11 10:19  尹庆超  阅读(122)  评论(0编辑  收藏  举报