【发布时间】:2014-11-29 14:32:58
【问题描述】:
我喜欢在单击按钮时附加带有查询字符串的会话 ID,它会重定向 asp.net 中的另一个页面。我尝试了很多..但是
Session["uname"] = null;
Session["pwd"] = null;
Session["lout"] = "a";
Response.Redirect("Login1.aspx?sid=" + Session["lout"].ToString(),true);
我在login.aspx的页面加载中使用了以下代码
if (Convert.ToString(Session["lout"]).Equals("a"))
{
lout.Text = "Logged Out Successfully ";
}
【问题讨论】:
-
请写一个更好的标题,重新格式化您的代码并添加更多解释。 meta.stackexchange.com/questions/10647/writing-a-good-title
-
你的问题不清楚。重定向到的另一个页面是什么?您的代码没有提供足够的细节。尝试添加更多细节和代码以明确问题所在!
标签: c# asp.net session cookies