[RESOLVED]Single tab application

Hello All,

Any idea how we can create asp.net application,it should not allow user to open in multiple tabs of the browser,the application should open in one tab only if user want to open in other tab it should not open. I am looking for some kind of server side validation,I
know we can do it at client side by some way.Let me know your thought.



You may look at "Single Page Application" template. However, even in this case, user has option to open the default (home) page in different tab manually.

If you are really facing the problem with sharing session across multiple tabs, that is altogether different discussion and I believe you should not go for disabling the tab specifically for this purpose and it is unusual to disable the tabs as it may confuse
the users.

Following discussion is worth to read:


you can only prevent this is you supply your own browser. there no way to detect this this server side, and most browsers will not let you detect it client side. in fact you can not detect open in tab vs open in new window. 

you can code your site to allow only 1 post per page view per authenticated user. you render a hidden field with request guid on every page view. you store this guid serverside attached to the user token. then on postback if the request guid does not match
the guid on file, you fail the post.

if multiple browsers are supported, just not multiple browsers per sessions (tabs), then tie the request guid to session.


Leave a Reply