468,790 Members | 1,887 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,790 developers. It's quick & easy.

Accesskey option

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
Nov 17 '05 #1
1 5226
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
<mailto:v-*****@microsoft.com>

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

--------------------
| Content-Class: urn:content-classes:message
| From: "Manan" <An******@hotmail.com>
| Sender: "Manan" <An******@hotmail.com>
| Subject: Accesskey option
| Date: Tue, 15 Jul 2003 07:34:48 -0700
| Lines: 13
| Message-ID: <0a****************************@phx.gbl>
| 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
|

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Alex Billerey | last post: by
reply views Thread by david cheng | last post: by
1 post views Thread by WJ | last post: by
1 post views Thread by Andre | last post: by
9 posts views Thread by Udo Marx | last post: by
1 post views Thread by Csaba Gabor | last post: by
3 posts views Thread by Ioannis Stefis | last post: by
5 posts views Thread by Lea GRIS | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.