asp.net handling Back button event after Logout

前端 未结 2 498
执念已碎
执念已碎 2020-12-10 23:07

In the logout link button click event I have cleared the session variables. I am checking these session variables for null values at each page\'s load event. If it has the n

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-10 23:44

    Try this code, hope it works

    Response.Cache.SetCacheability(HttpCacheability.NoCache);

    Response.Cache.SetExpires(DateTime.UtcNow.AddHours(-1));

    Response.Cache.SetNoStore();

提交回复
热议问题