xử lý phần update trong datalist Nguồn : forum.t3h.vn protectedvoid dlChiTietSach_UpdateCommand(object source, DataListCommandEventArgs e) { sqlChiTietSach.UpdateParameters.Clear(); //Bc 1: Khai bo TextBox txt = newTextBox(); Label lb = newLabel(); string TenSach, MaDanhMuc, NXB, TacGia, Gia, TomTatNoiDung, UrlAnh,GhiChu, MaSach; //Bc 2: Ly gi tr cc textbox truyn cho bin txt = (TextBox)e.Item.FindControl("txtTenSach"); TenSach = txt.Text; //Tng t cho 8 bin cn li txt = (TextBox)e.Item.FindControl("txtMaDanhMuc"); MaDanhMuc = txt.Text; // txt = (TextBox)e.Item.FindControl("txtNXB"); NXB = txt.Text; // txt = (TextBox)e.Item.FindControl("txtTacGia"); TacGia = txt.Text; // txt = (TextBox)e.Item.FindControl("txtGia"); Gia = txt.Text; // txt = (TextBox)e.Item.FindControl("txtTomTat"); TomTatNoiDung = txt.Text; // txt = (TextBox)e.Item.FindControl("txtUrlAnh"); UrlAnh = txt.Text; // txt = (TextBox)e.Item.FindControl("txtGhiChu"); GhiChu = txt.Text; // lb = (Label)e.Item.FindControl("lbMaSach"); MaSach = lb.Text; //Bc 3: sqlChiTietSach.UpdateParameters.Add("TenSach", TenSach); sqlChiTietSach.UpdateParameters.Add("MaDanhMuc", MaDanhMuc); sqlChiTietSach.UpdateParameters.Add("NXB", NXB); sqlChiTietSach.UpdateParameters.Add("TacGia", TacGia); sqlChiTietSach.UpdateParameters.Add("Gia", Gia); sqlChiTietSach.UpdateParameters.Add("TomTatNoiDung", TomTatNoiDung); sqlChiTietSach.UpdateParameters.Add("UrlAnh", UrlAnh); sqlChiTietSach.UpdateParameters.Add("GhiChu", GhiChu); sqlChiTietSach.UpdateParameters.Add("MaSach", MaSach); //Bc 4 sqlChiTietSach.Update(); dlChiTietSach.EditItemIndex = -1; sqlChiTietSach.DataBind(); } . xử lý phần update trong datalist Nguồn : forum.t3h.vn protectedvoid dlChiTietSach_UpdateCommand(object source, DataListCommandEventArgs. sqlChiTietSach.UpdateParameters.Add("TenSach", TenSach); sqlChiTietSach.UpdateParameters.Add("MaDanhMuc", MaDanhMuc); sqlChiTietSach.UpdateParameters.Add("NXB",