Reputation: 1414
Is there a standard approach in prompting users alerts, for a session timeout in ASP.NET MVC? I know we can have client jquery modal windows which can be used for alerting users, and it can be kept in layout or master pages, what if I have more than one master page.
Not sure if that is the best way to go about it.
Any help is appreciated...
Upvotes: 1
Views: 897
Reputation: 1414
Well I figured out another way to do it.
The approach I took is to create a jquery file. Inside it create DHTML and slidertimeout functionality both in it and then put the jquery file in the jquery bundle, in this way I have all my html (or DHTML) and functionality in one file, and its being referred through out the app
Upvotes: 0
Reputation: 9881
If there is a common layout page that all other layout pages use, then I would place it there. Otherwise, each layout page will need to include it.
Either way, to avoid duplication, you will want to place it in a user control so you can simply include it from where you need it using just a couple of lines of code.
Upvotes: 1