Blocking f5 and Esc Jey

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
 
G

Guest

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?
 
K

Kevin Spencer

No. You will have to handle it.

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

Flip

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.
 
J

Joe Fallon

Dino Esposito posted some code for how to handle a Refresh using an
HTPPModule.
Check his site.
 
K

Kevin Spencer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top