ASP.NET browser shows “web page has expired” for back button (after a post back)

前端 未结 2 1653
遥遥无期
遥遥无期 2020-12-17 01:42

I\'m having trouble with a simple ASP.NET application and the back button after a post back.

The page in question has a simple form on it, some text fields etc, and

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-17 02:08

    Depending on a situation you might get away with this hack/workaround:

     private void Page_PreRender(object sender, System.EventArgs e)
        {
            if (IsPostBack && !IsCallback)
            {
    
                Response.Write("\n");
    
                Response.End();
    
            }
    
        }
    

提交回复
热议问题