private void LoadPersonAddress() { this.txtID.Text = Request.QueryString["PersonID"]; int PersonID = Convert.ToInt32(txtID.Text); // if (Request.QueryString["AddressID"] != null) this.txtAID.Text = Request.QueryString["AddressID"]; int AddressID = Convert.ToInt32(txtAID.Text); //I should make a line of code for every text box, converting the value to the string . DataManager.DataAccess da = new DataManager.DataAccess(); DataSet ds = da.FetchPersonsAddresses(PersonID, AddressID); DataSet ds2 = da.FetchPersonAddresses(PersonID); //////////DataSet ds = da.FetchPhoneNumber(PhoneID); //////////DataSet ds2 = da.FetchPersonPhone(PhoneID); // DataSet ds2 = da.FetchPersonPhones(PersonID); // txtID.Text = ds.Tables[0].Rows[0]["PersonID"].ToString(); //txtPhID.Text = ds.Tables[0].Rows[0]["PhoneID"].ToString(); // object fpa = da.FetchPersonAddresses(); object ai = ds.Tables[0].Rows[0]["AddressID"]; // PhoneID, AreaCode, PhoneNumber, Extension, PhoneType object s1 = ds.Tables[0].Rows[0]["Street1"]; object s2 = ds.Tables[0].Rows[0]["Street2"]; object ci = ds.Tables[0].Rows[0]["City"]; object st = ds.Tables[0].Rows[0]["State"]; object zi = ds.Tables[0].Rows[0]["Zip"]; //txtID.Text = pi.ToString(); txtStreet1.Text = s1.ToString(); txtStreet2.Text = s2.ToString(); txtCity.Text = ci.ToString(); txtState.Text = st.ToString(); txtZip.Text = zi.ToString(); // object pid = ds2.Tables[0].Rows[0]["PersonID"]; // object aid = ds2.Tables[0].Rows[0]["AddressID"]; // object atid = ds2.Tables[0].Rows[0]["AddressTypeID"]; object EPAn = ds2.Tables[0].Rows[0]["Notes"]; object EPAd = ds2.Tables[0].Rows[0]["Description"]; txtDescription.Text = EPAd.ToString(); txtNotes.Text = EPAn.ToString(); }