asp.net跨页面传值

a.aspx.cs

//获取a中的id

HttpCookie objCookie = new HttpCookie("myCookie", id);
Response.Cookies.Add(objCookie);

 

b.aspx.cs

//获取a中的id

string id = Request.Cookies["myCookie"].Value;

你可能感兴趣的:(asp.net跨页面传值)