e.CommandArgument
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" DataKeyNames = "id" OnRowCommand = "GridView1_RowCommand"> <columns> <asp:TemplateField> <itemtemplate> <asp:LinkButton ID="LinkButton1" CommandName = "getid" runat="server" Text='<%# Eval("id") %>' CommandArgument='<%# Eval("id") %>'> </itemtemplate> </columns>
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { TextBox1.Text = e.CommandName.ToString(); }
eval("id")
if(!IsPostBack)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)