Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
Hi friends ,
 
I am using VS 2005 , framework2 and c#.net, asp.net.
I have implemented keyboard access key for save button .
It is Alt +s .
 
I want to underline for short cut key in the text of button like Save.
How to implement this ?
 
Thanks in advance,
George
Posted 8-Feb-11 19:15pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

<button id="mybutton" runat="server" onserverclick="myfunction">
<span style="text-decoration:underline;">P</span>rint</button>
 
and use a normal button event in your c# code:
 
protected void myfunction(object sender, EventArgs e)
{
        Response.Write("clicked");
}
 
OR try with AccessKey property
 
<asp:button id="Button1" runat="server" Text="Print" AccessKey="P" />
  Permalink  
Comments
SAKryukov at 9-Feb-11 1:38am
   
That is correct, my 5.
Also good to underline the character matching access key (with ) in text of the element.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 9 Feb 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid