I'm using Bootstrap 3 in my project, and I want to use Bootstrap Glyphicons in ASP.net buttons.
Here is the code I used, though it didn't work out (I got a sample which uses Twitter Bootstrap <span>
tags instead of <i>
tags):
<asp:Button ID="btnRandom"
runat="server"
Text="<span aria-hidden='true'
class='glyphicon glyphicon-refresh'>
</span>"
onclick="btnRandom_Click" />
Maybe something extra should be done.
How can I get it to work? Thanks in advance for the replies.
its work for Asp:Button glyphicon style:
What is real use of
ASP Server
control when you can do that inHTML
server control :You can convert the HTML element to a server control by setting the runat="server" attribute.
You have to use asp:LinkButton instead of a asp:Button, here is how it works for me using Bootstrap 3 in an ASP.NET web-application:
From your code you can make the following work:
Here is an example of what I use for a Submit Button with text "Submit":
try this
You can use linkButton instead of button or asp:Button just like this;