开发者

Controller Timeout MVC 3.0

开发者 https://www.devze.com 2023-02-08 22:58 出处:网络
On page load i get current Datetime , and then I need to redirect user after 1 hour spend on the p开发者_Python百科age.This isn\'t really controller logic unless you were using an async controller to

On page load i get current Datetime , and then I need to redirect user after 1 hour spend on the p开发者_Python百科age.


This isn't really controller logic unless you were using an async controller to do some async work server side. Then you could add this async timeout attribute: [AsyncTimeout(3600000)].

Otherwise, I'd do the timeout in javascript/jquery where I'd set a timer and after one hour do redirect in the js or call a controller to handle the redirect.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号