我只是新的ASP .NET,我想知道如何在保存并重定向到其他页面后清除所有数据条目?如何在完成保存数据后清除缓存?
我曾经尝试这样做我的HTML页面上,
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
而且这对我的代码页的背后,
protected void Page_Load(object sender, System.EventArgs e)
{
if(!Page.IsPostBack)
{
Response.Cache.SetCacheability(HttpCacheability.Server);
Response.Expires = -1;
Response.AddHeader("Pragma", "No-Cache");
Response.CacheControl = "no-cache";
}
}
但仍然每当我回到我的编码数据/页出现。
请帮助。非常感谢。谢谢。 :d
我从其他页面去,但我点击'返回'后仍填充页面。我进入第2页后,我想要page1,然后再点击页面1将转到其原始视图。无论如何Thx帮助。 – pampi