Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Accesskey option

Reply
Thread Tools

Accesskey option

 
 
Manan
Guest
Posts: n/a
 
      07-15-2003
hi All,

I'm using a web application. On my .aspx pages I want to
add shortcut keying option to textbox, dropdown, and
button. I know i can use AccessKey to add shortcuts but
I'm having problem with Button control. I want, when user
uses Alt + P. I want to give focus to a button control. I
have tried button1.Text = "&Print"; didn't work.

Any help is appreciated.

Thanks
Manan
 
Reply With Quote
 
 
 
 
Lewis Wang [MSFT]
Guest
Posts: n/a
 
      07-16-2003
Hi Manan,

You can add an AccessKey property on the Button control. The following
simple ASPX page works properly on my side. You can test the page on your
side:

<HTML>
<HEAD>
<title>WebForm1</title>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<INPUT style="Z-INDEX: 101; LEFT: 112px;
POSITION: absolute; TOP: 184px" type="button"
value="Type Alt+n" accesskey="N">
<asp:Button id="Button1" style="Z-INDEX: 102; LEFT:
112px; POSITION: absolute; TOP: 96px" runat="server"
Text="Type Alt+p" AccessKey="P"
></asp:Button>

</form>
</body>
</HTML>

Does this answer your question?

Best Regards,
Lewis Wang
Support Professional
<(E-Mail Removed)>

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Manan" <(E-Mail Removed)>
| Sender: "Manan" <(E-Mail Removed)>
| Subject: Accesskey option
| Date: Tue, 15 Jul 2003 07:34:48 -0700
| Lines: 13
| Message-ID: <0af801c34ade$3e5a3440$(E-Mail Removed)>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNK3j5arcUPE4tnRpCdQHhpfYUbfQ==
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:159236
| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| hi All,
|
| I'm using a web application. On my .aspx pages I want to
| add shortcut keying option to textbox, dropdown, and
| button. I know i can use AccessKey to add shortcuts but
| I'm having problem with Button control. I want, when user
| uses Alt + P. I want to give focus to a button control. I
| have tried button1.Text = "&Print"; didn't work.
|
| Any help is appreciated.
|
| Thanks
| Manan
|

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MenuItem - ALT, LONGDESC attributes, AccessKey Property? theintrepidfox@hotmail.com ASP .Net 0 01-09-2006 07:02 AM
AccessKey and letting the user know =?Utf-8?B?QW5kcmU=?= ASP .Net 1 01-02-2005 08:24 AM
KeyBoard Accelerator (AccessKey)? WJ ASP .Net 1 06-26-2004 07:33 PM
AccessKey.............. Gill Smith ASP .Net 1 05-17-2004 11:34 PM
AccessKey doesn't work when load pdf document on XP? david cheng ASP .Net 0 04-21-2004 11:56 PM



Advertisments