How to put underline for first letter for access key for ?
asp:buttons are output as html "input" tags with a type of "submit". The text displayed on them is output in the "value" attribute of the tag, and so cannot contain any styling or html. If you could get an asp:button to output as an html button then you could try something like:
<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");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With