页面一

publicstring name
{
get
{
returnthis.TextBox1.Text;
}
}
publicstring EMail
{
get
{
returnthis.TextBox2.Text;
}
}

protectedvoid Button1_Click(object sender, EventArgs e)
{
Context.Items.Add(
"name", name);
Context.Items.Add(
"EMail", EMail);
Server.Transfer(
"WebForm2.aspx");
}

跳转后的页面

Response.Write(Context.Items["name"].ToString() + Context.Items["EMail"].ToString());

2:cs端返回上一页

获取页面地址存入ViewState

   步骤一: ViewState["UrlReferrer"] = Request.UrlReferrer.ToString();

 步骤二: Response.Redirect((String)ViewState["UrlReferrer"]);

posted on 2011-06-24 13:27  高兴happy  阅读(473)  评论(0编辑  收藏  举报