Hanusha Loujith

Hanusha Loujith

  • 1.8k
  • 292
  • 5.6k

Showing popup message for session timeout in MVC

Jan 4 2023 5:27 PM


In my MVC application I used a class SessionTimeoutAttribute for handling session timeout. This attribute I used in all the controller. Hence when the session expires, it’s getting redirected to login page. It’s working as expected.attaching/forums/uploadfile/cb8dbf/01042023172233PM/cls.txt the code which I have used in the filter class

But now I need to show a popup message which should show the message “Your session got expired. Please login again” and after clicking on the ok button on the popup, it should redirect to login page. Can someone please help me to fix the issue?




Answers (4)