Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use bootsrap icon on asp.net button

hello friends i want to use Bootstrap like icons with button but when i try using it in my asp.net project the image doesnt shows can you please tell me how to use bootstrap icon with buttons i have tried this code

<i class="icon icon-ok"><asp:Button ID="SubmitBtn" runat="server" OnClick="SubmitBtn_Click" Text="Submit" CssClass="btn btn-small btn-primary" /></i>

and this one too

<asp:Button ID="SubmitBtn" runat="server" OnClick="SubmitBtn_Click" Text="Submit" CssClass="btn btn-small btn-primary" ><i class="icon icon-ok"></i> </asp:Button>

also i tried using this <asp:Button ID="SubmitBtn" runat="server" OnClick="SubmitBtn_Click" Text="Submit&nbsp;<i aria-hidden=true class=icon-ok icon-white></i>" CssClass="btn btn-small btn-primary" />

but it dont work please someone post a solution how to make it work ???

like image 559
user2228550 Avatar asked Apr 07 '13 15:04

user2228550


2 Answers

LinkButton, like this...

<asp:LinkButton ID="SubmitBtn" runat="server" OnClick="SubmitBtn_Click" CssClass="btn btn-small btn-primary"><i class="icon icon-ok"></i>&nbsp;Submit</asp:LinkButton>

https://stackoverflow.com/a/11373500/1315626

like image 165
scw Avatar answered Oct 20 '22 03:10

scw


<button type="button" onserverclick="Unnamed_ServerClick" class="btn btn-default " runat="server" > <span class="glyphicon glyphicon-search"></span></button>
like image 20
abdelhedi hlel Avatar answered Oct 20 '22 02:10

abdelhedi hlel