Search code examples
asp.nettwitter-bootstrapgridviewbootstrap-modalaspxgridview

How to put glyphicons in asp gridview asp:buttonField


I am trying to run this code

<asp:ButtonField ButtonType="Link" ItemStyle-Width="40px" ControlStyle-ForeColor="#cc6600" Text="<i id='h3h' aria-hidden='true' data-toggle='tooltip' title='Billing' data-placement='right' class='glyphicon glyphicon-list-alt'></i>"/>

but I would like to change the ButtonType="Link" into ButtonType="Button" because of some functionality reason, but the glyphicons is not working on a ButtonType="Button", is there any other way to make it work?.


Solution

  • I tried this simple one by setting text with single qoutes

    <asp:ButtonField CommandName="Select" HeaderText="SELECT" ShowHeader="True" 
        Text='<i class="glyphicon glyphicon-list-alt"></i>' />