Professional Web Applications Themes

Accesskey option - ASP.NET General

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

  1. #1

    Default 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
    Manan Guest

  2. #2

    Default RE: Accesskey option

    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-lwangmicrosoft.com>

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

    --------------------
    | Content-Class: urn:content-classes:message
    | From: "Manan" <Anand125hotmail.com>
    | Sender: "Manan" <Anand125hotmail.com>
    | Subject: Accesskey option
    | Date: Tue, 15 Jul 2003 07:34:48 -0700
    | Lines: 13
    | Message-ID: <0af801c34ade$3e5a3440$a501280aphx.gbl>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | cht="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] Guest

Similar Threads

  1. Replies: 0
    Last Post: June 16th, 02:04 PM
  2. scroll down option?
    By shannondavies.ca in forum Web Design
    Replies: 0
    Last Post: May 15th, 01:41 AM
  3. Help with HELP option
    By Bert_SImpson@adobeforums.com in forum Adobe Photoshop Mac CS, CS2 & CS3
    Replies: 2
    Last Post: April 30th, 07:54 PM
  4. Replies: 2
    Last Post: September 9th, 11:16 PM
  5. no PNG option?
    By cs cs in forum Adobe Photoshop Elements
    Replies: 2
    Last Post: September 3rd, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139