protected void btnRegister_Click(object sender, EventArgs e) { phoneNum = txtPhoneNum.Text; email = txtEmail.Text; description = txtDescription.Text; url = txtURL.Text; email = txtEmail.Text; sID = txtSiteID.Text; lblAPI.Text = ""; merchant m = new merchant(); APIkey = m.apiGenerator().ToString(); Boolean keyFound = m.checkAPIExist(APIkey); while (keyFound == true) { APIkey = m.apiGenerator().ToString(); keyFound = m.checkAPIExist(APIkey); } lblAPI.Text = APIkey; //construct customerInfo object to pass into webservice webmthod (registerSite) merchant newMerch = new merchant(txtGroupMember1.Text, txtGroupMember2.Text, phoneNum); //check if merchant exists by siteID and return either true or false depending on if //it has been added if (pxy.RegisterSite(sID, description, APIkey, email, m.contactInfo(newMerch)) == false) { lblMerchantAdded.Text = "Merchant seems to already exist. Try again!"; } else lblMerchantAdded.Text = "Merchant Added Successfully. Please take note of your API Key!"; }