Groups | Blog | Home
all groups > asp.net webcontrols > october 2003 >

asp.net webcontrols : Re: Assigning Hot Keys in Web Applications


Nicholas Paldino [.NET/C# MVP]
10/27/2003 9:31:58 AM
Garfield,

I don't belive that hot keys are supported in web-browsers, at least, as
defined by HTML script and JavaScript. The closest I think you can get to
this is to have a key press handler for the body of the document and then
process each key press.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
[quoted text, click to view]

Garfield
10/27/2003 2:08:44 PM
Hello,

Can anybody help me to add a hot key to a web application button and have
the text on the button underscored. I'm using C# within .NET

e.g. assign Alt-C to a button with text "Click Me" where the "C" is
underscored.


Many Thanks
Garfield



Diwakar R
10/27/2003 7:58:19 PM
Hi,
You could use VBScript/Javascript to capture Key-Press events at the client
and then decode the Key-Press for further action.

Hope this helps.

-Diwakar
[quoted text, click to view]

Bernardo Heynemann
10/30/2003 5:04:34 PM
Yes it does and works quite well (at least in IE).
Example:
<input type="submit" value="Send (ALT+S)" class="comboSm" ACCESSKEY =
"S">

Hope it helps,
--
Bernardo Heynemann
Developer ASP / VB @ Banco BVA S/A Brazil
E-Mail: bernardo@bancobva.com.br
Site: http://www.bancobva.com.br
Phone: (5521) 3231-1100 R:1237
"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> escreveu
na mensagem news:%2340dXdJnDHA.2808@TK2MSFTNGP10.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button