you need to use OnRowCommand event for that.
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
Width="180px" AutoGenerateEditButton="True"
OnRowCommand=GridView1_RowCommand
onselectedindexchanged="GridView1_SelectedIndexChanged">
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
switch (e.CommandName)
{
case "sms":
{
break;
}
default:
break;
}
}
If this helped you then please Vote and mark it as answer