Click here to Skip to main content
15,886,001 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to set a shortcut key like"F5" to a button in asp.net?
Posted
Updated 24-May-10 4:25am
v2

F5 is the browser refresh key for many browsers.
IMO, you should not be changing this to be controlled by your page.
 
Share this answer
 
v3
Comments
Fort.Nox 24-May-10 10:33am    
OK but how doi Set shortcuts to a button in asp.net
Abhinav S 24-May-10 11:42am    
See http://msdn.microsoft.com/en-us/library/ms178233.aspx
In VB it is simple...

VB
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF2
Call Proc_Event1
Case vbKeyF3
Call Proc_Event2

End Select
End Sub


I imagine it would not be too different in asp.net

Hope that helps

(BTW, Don't assign F1, F5 or F12)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900