This row command event occurs when the gridview row selections occur
EX:
<asp:Gridview runat="server" onrowcommand="grvFiledsResult_RowCommand" >
<Columns>
<asp:TemplateField HeaderText="ID">
<ItemTemplate>
<asp:LinkButton runat="server" ID="lnkmy" Text="mylinl" CommandName="NavigateId" />
</ItemTemplate>
</asp:TemplateField>
</gridview>
.Cs Code:
protected void grvFiledsResult_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "NavigateId")
{
Response.Write(e.CommandName.ToString());
}
}
No comments:
Post a Comment