62,266
社区成员
发帖
与我相关
我的任务
分享 protected void DataList1_UpdateCommand(object source, DataListCommandEventArgs e)
{
int g_id = Convert.ToInt32(DataList1.DataKeys[e.Item.ItemIndex]);
TextBox reply = (TextBox)e.Item.FindControl("TextBox1");
string replyValue = null;
if (reply.Text.Trim().Length > 0)
replyValue = reply.Text.Trim();
operateDB.ExcuteNonQuery("update guest set g_reply='" + replyValue + "' where g_id=" + g_id);
DataList1.EditItemIndex = -1;
DataList1.DataBind();