Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Font Awesome Icons with ASP.Net Button with Server Control Properties [duplicate]

Tags:

c#

asp.net

I want to use Font Awesome Icons with a button along the text. For this purpose...

When I use as :

<asp:Button Text="Submit" ID="btnSubmit" runat="server" />

it is not possible to have any icon text inside the tags.

So I am using as :

  <button runat="server" id="btnSubmit">
           Submit <i class="fa fa-forward" aria-hidden="true"></i>
  </button>

But in this method, the problem is I can't use the 'ValidationGroup' property.

Please suggest me anyway and tell What I am missing.

like image 663
Bholu Bhaiya Avatar asked May 31 '17 09:05

Bholu Bhaiya


Video Answer


1 Answers

You can use LinkButton. It supports HTML code rendering.

<asp:LinkButton runat="server" ID="btnSubmit" class="btn btn-mini">
    Submit <i class="fa fa-forward" aria-hidden="true"></i>
</asp:LinkButton>
like image 91
Omar Muscatello Avatar answered Oct 18 '22 19:10

Omar Muscatello