How to set underscore for passkey for <asp: button>?
How to put an underscore for the first letter of an access key for?
+6
Nikita
source share2 answers
asp: buttons are displayed as "input" html tags of type "submit". The text displayed on them is displayed in the "value" attribute of the tag and therefore cannot contain any style or html. If you can get the asp: button to output as an html button, you can try something like:
<button id="mybutton" runat="server" onserverclick="myfunction"> <span style="text-decoration:underline;">P</span>rint</button> and use a regular button event in C # code:
protected void myfunction(object sender, EventArgs e) { Response.Write("clicked"); } +4
Rob bell
source shareTried AccessKey attribute?
<asp:button id="Button1" runat="server" Text="Print" AccessKey="P" /> If it is really emphasized, it is not under your control. A user agent (such as a browser) decides that.
0
Tomalak
source share