请教一下GirdView更新事件接收值问题?
向各位请教一个问题:
在GirdView更新文字按钮加有一个事件
protected void LinkButton1_Click(object sender, EventArgs e)
在这事件中,怎样接收更新TextBox2的值呢?
在a.aspx 文件里有: <form id= "form1 " runat= "server ">
GridView1 和 GridView2 控件.
部分源码如下:
<asp:GridView ID= "GridView2 " runat= "server " AllowPaging= "True " AllowSorting= "True "
CellPadding= "4 " DataSourceID= "SqlDataSource2 " ForeColor= "#333333 " GridLines= "None ">
<FooterStyle BackColor= "#507CD1 " Font-Bold= "True " ForeColor= "White " />
<Columns>
<asp:TemplateField ShowHeader= "False " HeaderText= "操作 ">
<EditItemTemplate>
<asp:LinkButton ID= "LinkButton1 " runat= "server " CausesValidation= "True " CommandName= "Update "
Text= "更新 " OnClick= "LinkButton1_Click "> </asp:LinkButton>
<asp:LinkButton ID= "LinkButton2 " runat= "server " CausesValidation= "False " CommandName= "Cancel "
Text= "取消 "> </asp:LinkButton>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID= "LinkButton1 " runat= "server " CausesValidation= "False " CommandName= "Edit "
Text= "更新加入 "> </asp:LinkButton>
</ItemTemplate>