Notify user when session time out in asp.net

前端 未结 4 1181
南旧
南旧 2020-12-28 11:24

What is the best way to show a message to user after session is expired? By then, the user should be logged out and redirected to start page. I can use javascript to redirec

4条回答
  •  感情败类
    2020-12-28 11:58

    In your JavaScript redirect add a querystring parameter to your redirect URL.

    
    

    Then in your start page, you can have code to check the querystring and display a message if that's the case.

    <%
    'home.aspx
    If Request.QueryString("action") = "expired" Then 
      Response.Write("

    You have been logged out due to inactivity.

    ") End If %>

提交回复
热议问题