protected void btnSubmit_Click(object sender, EventArgs e) { if (txtCC.Text != null && txtCC.Text != string.Empty) { rs.insertCC(txtCC.Text); VendorGrid.DataBind(); txtCC.Text = string.Empty; } }
protected void AddVendorButton_Click(object sender, EventArgs e) { if (Page.IsValid) { Vendor vendor = new Vendor(); vendor.Name = AddVendorName.Text; vendor.Save(); AddVendorName.Text = string.Empty; VendorGrid.DataBind(); } }
protected void SaveButton_Click(object sender, System.EventArgs e) { if (Page.IsValid) { // save the vendors SaveVendors(); } ModalPopupExtender.Hide(); VendorGrid.DataBind(); EditAjax.Update(); }
private void RebindGrid() { VendorGrid.DataSource = Vendors; VendorGrid.DataBind(); }