首页  :: 订阅 订阅  :: 管理

Session 和 通过URL Request两种方式在 page之间传递数据

Posted on 2005-04-21 10:27  GaoJie[高杰]  阅读(290)  评论(0)    收藏  举报
设置 session
   this.Page.Session["UserName"]="GaoJie";
   this.Page.Session["Password"]="Password1";

设置 URL 参数
   this.Page.Response.Redirect("Framework_InterpretSite.aspx?country=China",true);

读取Session
     // this.Help.Text=this.Page.Session["UserName"].ToString();
  // this.Contact_Us.Text=this.Page.Session["Password"].ToString();

读取 URL 参数
   // this.Help.Text=this.Page.Request["country"].ToString();