I am trying to add a Delete function to the records in my ASP.NET GridView control.
I want to have a font-awesome trash icon which will execute the Delete function on click but I am having trouble getting it to display.
Here is my template field
:
<asp:TemplateField HeaderText="Delete?">
<ItemTemplate>
<!--Text="Delete"
<i style="font-size:24px" class="fa" onclick="Delete" runat="server"></i>
<i class="fa fa-trash-o">
-->
<span onclick="return confirm('Are you sure to delete?')">
<button ID="lnkDelete"
runat="server"
ItemStyle-CssClass="fa fa-trash-0"
fontsize="24px"
CommandName="Delete"/>
</span>
</ItemTemplate>
</asp:TemplateField>
but after I deploy my Solution and refresh, I get this:
and I want something like this (but with just the Trash icon)
so what's the right way to do this?