Hi Amol111,
Refe below sample.
HTML
<asp:GridView runat="server" ID="gvCustomers" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField HeaderText="Tracker ID">
<ItemTemplate>
<asp:LinkButton runat="server" ID="btnlnkTracker" CssClass="btn btn-bock btn-sm btn-danger"
CommandName="SelectIssue" CommandArgument='<%#Eval("Tracker_Issue_ID_PK")%>'
OnClick="Change">
<span class="fa fa-edit"></span> Reply
</asp:LinkButton>
</ItemTemplate>
<ItemStyle CssClass="grditem" />
</asp:TemplateField>
</Columns>
</asp:GridView>
Namespaces
C#
using System.Data;
VB.Net
Imports System.Data
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.Add("Tracker_Issue_ID_PK");
dt.Rows.Add(1);
dt.Rows.Add(2);
dt.Rows.Add(3);
this.gvCustomers.DataSource = dt;
this.gvCustomers.DataBind();
}
}
protected void Change(object sender, EventArgs e)
{
LinkButton lnkButton = (sender) as LinkButton;
lnkButton.Text = "<span class=\"fa fa-reply\"></span> Replied";
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not Me.IsPostBack Then
Dim dt As DataTable = New DataTable()
dt.Columns.Add("Tracker_Issue_ID_PK")
dt.Rows.Add(1)
dt.Rows.Add(2)
dt.Rows.Add(3)
Me.gvCustomers.DataSource = dt
Me.gvCustomers.DataBind()
End If
End Sub
Protected Sub Change(ByVal sender As Object, ByVal e As EventArgs)
Dim lnkButton As LinkButton = TryCast((sender), LinkButton)
lnkButton.Text = "<span class=""fa fa-reply""></span> Replied"
End Sub
Screenshot