gridview中加了一列buttonfield,写好了按钮事件,如果点了两次以上再后退网页就是过期,有什么办法让它不显示过期或者直接退到上一页面?

解决方案 »

  1.   

    记录上一页Response.Redirect("~/Default.aspx")
    设置CacheControl为private
    <META content=no-cache>   
    <META http-equiv=Cache-Control content=no-cache>   
    <META http-equiv=Expires content=0>   Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);   
    Response.Expires = 0;   
    Response.Buffer = true;   
    Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);   
    Response.AddHeader("pragma", "no-cache");   
    Response.CacheControl = "no-cache";