Accesskey option

Discussion in 'ASP .Net' started by Manan, Jul 15, 2003.

  1. Manan

    Manan Guest

    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
     
    Manan, Jul 15, 2003
    #1
    1. Advertising

  2. 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:>

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

    --------------------
    | Content-Class: urn:content-classes:message
    | From: "Manan" <>
    | Sender: "Manan" <>
    | Subject: Accesskey option
    | Date: Tue, 15 Jul 2003 07:34:48 -0700
    | Lines: 13
    | Message-ID: <0af801c34ade$3e5a3440$>
    | 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
    |
     
    Lewis Wang [MSFT], Jul 16, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. david cheng
    Replies:
    0
    Views:
    433
    david cheng
    Apr 22, 2004
  2. Gill Smith

    AccessKey..............

    Gill Smith, May 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    769
    Ken Cox [Microsoft MVP]
    May 18, 2004
  3. WJ
    Replies:
    1
    Views:
    394
  4. =?Utf-8?B?QW5kcmU=?=

    AccessKey and letting the user know

    =?Utf-8?B?QW5kcmU=?=, Jan 1, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    440
    Eliyahu Goldin
    Jan 2, 2005
  5. Replies:
    0
    Views:
    497
Loading...

Share This Page