【发布时间】:2016-07-09 13:12:23
【问题描述】:
我正在为我的 asp.net Web 应用程序使用 android webview,下面的代码假设更改所选的国家/地区,这在 web 浏览器中运行良好,但当我单击此按钮时,它不能与 webview 中的 android webview 一起使用它移动我到 index.aspx 但国家仍然是在他没有接受 cookie 的新值之前选择的国家/地区
protected void chgcontrybtn_Click(object sender, EventArgs e)
{
if (Request.Cookies["countryCookies"] != null)
{
Response.Cookies["countryCookies"].Expires = DateTime.Now.AddDays(-1);//to remove cookies
Response.Redirect("Index.aspx");
}
else if (Request.Cookies["Location"] != null)
{
Response.Cookies["Location"].Expires = DateTime.Now.AddDays(-1);
Response.Redirect("Index.aspx");
}
}
【问题讨论】:
标签: c# android cookies webview