Gunawan wrote:
Dear All,
I would like to know how to disable 'open in a new tab' or 'open in a new
window' feature coz I would like to maintain parameter using session id
which is not change if we using those two feature. In fact I would like to
make my web application stay on one web browser windows during the session.
Regards,
Gun
But what if the user copies the address from the address bar and copies
that into a new window manually? Or they bookmark the page and use that
to get a second window open. Those are just two off the top of my head
- there would be other ways of circumventing this disabling.
Best is: Redesign the application to cope with this situation. Second
best is to warn the user at the outset, then if you detect something
has gone amiss, react to it (possibly with a large page of text that
says "I told you not to do that").
Of course, if your application is based entirely on postbacks and
server.transfers, you may be able to engineer it to detect the second
page being opened (Basics being that if you get into Page.Load,
IsPostback is false, and nothing has been manually added to the
HttpContext to indicate that a Server.Transfer has occurred, then you
know that it's a fresh page request, and you should react accordingly)
Damien