Write a web page in asp.net MVC, in certain operations is to ensure that the login status, consider using authentication filter, verify by customs, not by let him go to login, then the problem comes, log in using the bootstrap modal dialog is done, but I don't know how to open this mode in the filter box, when studying the bootstrap to see there are two kinds of modal dialog open way, is a link or button, it definitely won't work, then can only use js code, but how to output the js into HTML from the server? With the response. It's useless to write, I also don't know the other way, consider directly at the front desk to write js judgment login status and then decided to open the login window or continue to perform the requested, but if so this filter is not just doesn't do anything, feeling should not implement, online search along while also didn't find any good solutions, solving, less code to write, want to have a train of thought
CodePudding user response:
Do you not use a filter, at the time of intercepting verify login, if there is no login is returned to the client, and then you popup modal dialog, why do you want to return from the background modal dialog?
CodePudding user response:
Separate returns to a login page, Is not the kind of the modal dialog
CodePudding user response:
Modal words can also..
Global a js write inside a method..
Similar
The function showLogin () { XXX. Showdia... }
Then judge if there is no landing in interceptor output a js not redirected...
CodePudding user response:
How the output of js, the response. The write? Use this output is only a js code, the background is there any way you can call page written js