do not open pop up on session expires
I have a page in asp.net. A button click in the page will开发者_开发问答 open a pop-up.
Now if session is expired, it is opening the pop-up window and in the pop-up it is showing the login screen.
Is there any way in which i can avoid pop-up being opened if the session is expired and directly go back to login page?
When you say pop-up, do you mean window.open? If so, then you have to make a AJAX call to verify the session, before opening the new window.
I am not sure I understand your requirement clearly. There is no exact way to achive this. But we can do it javascript.
put a timer(duration would be session timeout, use settimeout function) in the parent page. Check this value before open a popup.
精彩评论