Hi,
Set the
CommandArgument
Property of the button or linkbutton as your column header text. Like:
<asp:linkbutton id="lnkAddNew" runat="server" text="Add" commandname="AddNew" commandargument="MyColumnHeaderText" xmlns:asp="#unknown" />
And Handle it like:
if (e.CommandName == "AddNew")
{
lbl1.Text=e.CommandArgument.ToString();
}
Or
if (e.CommandName == "AddNew")
{
CommandField cf=sender as CommandField;
lbl1.Text=cf.HeaderText;
}
--Amit