protected void btnSave_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(hiddenValue.Value)) { int Cat_ID = Convert.ToInt32(cb_P_catID.SelectedValue); proCateController.DeleteCategoryLayout(Cat_ID); string[] arrGrid = hiddenValue.Value.TrimEnd('$').Split('$'); foreach (string gridItem in arrGrid) { proCateController.InsertCategoryLayout(Cat_ID, Convert.ToInt32(gridItem.Split('_')[0].Replace("container", "")), Convert.ToInt32(gridItem.Split('_')[1])); } this.Page.RegisterClientScriptBlock("successfull", "<script>alert(\"Cập nhật thành công!\")</script>"); BindData(Cat_ID); } }