protected void saveEditedUserInfo(Dictionary<string, string> formInfo) { saveErr = ""; try { mySqlConnector mySqlConn = new mySqlConnector(); if (mySqlConn.isInitialized()) { saveErr = mySqlConn.saveUserEditInfo(Email.Text, formInfo) ? "" : mySqlConn.connErrMsg; if (saveErr != "") { displayEditErrors(saveErr); mySqlConn.deInitialize(); } else { //write new session values Session["emailAddress"] = formInfo["Email"]; Session["firstname"] = formInfo["First Name"]; Session["lastName"] = formInfo["Last Name"]; mySqlConn.deInitialize(); resetPage("Your Information has been updated!"); } } else { displayEditErrors(mySqlConn.connErrMsg); } } catch (Exception ee) { displayEditErrors(ee.Message.ToString()); } }