</ItemTemplate>
</asp:TemplateField>
// cs 代码
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
string id = this.GridView1.DataKeys[e.RowIndex].Value.ToString();
string username = (this.GridView1.Rows[e.RowIndex].Cells[2].Controls[0] as TextBox).Text;
string sql = "update feeinfo set username='" + username + "' where id=" + id + "";
if (connection.ExecutUpdate(sql))
{
GridView1.EditIndex = -1;
// DataBind();
bind(""); //绑定数据
}
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int id=int.Parse(this.GridView1.DataKeys[e.RowIndex].Value.ToString());
string sql = "delete from feeinfo where id="+id+"";
if (connection.ExecutUpdate(sql))
{
Response.Write("