Blocking f5 and Esc Jey

  • Thread starter Thread starter Nelson
  • Start date Start date
N

Nelson

Is there anyway I can stop user hitting the F5 or Esc key while using my
application. My application is developed in ASP.Net, VB.Net and .Net
Framework 1.1. All my clients are using IE 5.5X and above versions.
Thanks,
Nelson
 
You could take the f5 key off of their keyboard but they could always just
buy a new one. Why do you want to do this?
 
No. You will have to handle it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
You could take the f5 key off of their keyboard but they could always just
I was going to suggest hover behind them with a hockey stick and hitting
them whenever they hit the F5 key. They'll learn not to hit the refresh
button sooner or later. :>

But seriously, If you are doing this in a thick client, I believe you can
consume() the keystroke. If you are on a thin client (IE?) then you are not
alone. :< I'm coming from j2ee/jsps and we've had to create some funky
framework around handling this type of thing. It must be a common problem
cause in .net you have the Postback property you can interrogate and do
things if it's a new request or a second+ one. Maybe those help? Hopefully
not the hockey stick, it's too hard to get to all your users! :> haha :>
Good luck.
 
Dino Esposito posted some code for how to handle a Refresh using an
HTPPModule.
Check his site.
 
Okay, so what about the other 25 ways to refresh a page?

Allright, I exaggerated. 5 ways.

Bottom line is, attempting to control the client is both futile and
fruitless. It only makes them angry, which ain't so good for business. Look
what happened to the Democrats.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
Back
Top