protected void btnManOK_Click(object sender, EventArgs e) { // Add the manufacturer // Re-bind the combo box // Clear out the manufacturer. string szNew = txtManufacturer.Text; if (txtManufacturer.Text.Length > 0) { // first see if this string is already present; if so, just select it. if (!SelectIfPresent(szNew)) { Manufacturer m = new Manufacturer(szNew); if (m.IsNew) { m.FCommit(); } RepopulateManufacturerDropdown(m.ManufacturerName); SelectIfPresent(m.ManufacturerName); } } txtManufacturer.Text = ""; ModalPopupExtender1.Hide(); }