您的位置:首页 > 理论基础 > 计算机网络

asp.net页面传递参数的另一种用法 HttpContext.Current.Items

2012-03-28 17:01 603 查看
--------- 页面A -----------

HttpContext.Current.Items.Add("A",
a.Text);

HttpContext.Current.Items.Add("B",
b.Text);

HttpContext.Current.Items.Add("C",
c.Text);

this.Server.Transfer("B.aspx");

------- 页面B -----------------

string strA =
HttpContext.Current.Items["A"].ToString();

string strB = HttpContext.Current.Items["B"].ToString();

string strC = HttpContext.Current.Items["C"].ToString();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: