.net Access Forms authentication “timeout” value in code

后端 未结 6 1637
小蘑菇
小蘑菇 2021-02-09 18:39

I\'m adding a logout expiration alert to my application and would like to access my web.config forms authentication \"timeout\" value from my code. Any way i could do this?

6条回答
  •  猫巷女王i
    2021-02-09 19:21

    You can access it from your Javascript using the following:

    var expireTime = <%= FormsAuthentication.Timeout.TotalMinutes %>;
    

提交回复
热议问题