Francis Saul
Francis Saul

Reputation: 750

How to put glyphicon on Asp.net Button?

I want to put glyphicon to asp.net Button but the icon is not showing, there is no error and the class is added but not showing up. I don't want LinkButton or html server. Is there anyone already accomplished this? thanks!

      <asp:Button ID="btnSave" Text="Save" class="btn btn-primary glyphicon glyphicon-save" runat="server" Width="150px"
                  OnClick="btnSave_Click" />    

Upvotes: 0

Views: 2921

Answers (2)

Merdeka
Merdeka

Reputation: 13

Try this:

<div class="btn btn-primary glyphicon glyphicon-search">
<asp:Button ID="btnSave" runat="server" Text="Search" BackColor="Transparent" BorderWidth="0" OnClick="btnSave_Click" />

Upvotes: 0

Nisha Salim
Nisha Salim

Reputation: 707

Try this

<div class="btn btn-primary glyphicon glyphicon-save">
    <asp:Button ID="btnSave" Text="Save"  runat="server" Width="150px"
                  OnClick="btnSave_Click" />    
</div>

Upvotes: 1

Related Questions