protected void btnSave_Click(object sender, EventArgs e) { ProductType productType = new ProductType(); productType.Name = ToSQL.EmptyNull(txtName.Text); productType.Note = ToSQL.EmptyNull(txtNote.Text); productType.IsActive = true; productType.SortId = 0; productType.DateCreated = DateTime.Now; productType.DescriptionTemplate = CKEditorControlDescriptionType.Text; int i = productTypeRepo.CreateProductType(productType); Response.Redirect("Management-ProductType.aspx"); }