title: update contact info based on input fields through tsql
body: <p>I have a web application that I am developing that has an 'my profile' page. This page grabs all the users info and populates the appropriates fields. <img src="https://i.stack.imgur.com/JmueT.png" alt="enter image description here"></p>
  
  <p>Certain details have been blacked out for privacy reasons. This is working great. What i want to achieve is the ability for the user to edit any of these text fields, and hit the 'update information' button. I am not sure how to do this. </p>
  
  <p>Here is my code behind for what I have working so far. </p>
  
  <pre><code>    protected void Page_Load(object sender, EventArgs e)
      {
          if (!IsPostBack)
          {
              grabData();
          }
      }
  
      protected void grabData()
      {
          HttpCookie cookieLogin = Request.Cookies[Constants.CK_CAUSE_MARKETER_ID];
  
          string sql = "SELECT * " +
                      "FROM CauseMarketers m with(nolock)" +
                      "INNER JOIN CauseMarketer_Contacts t with(nolock) ON t.CauseMarketerID = m.CauseMarketerID " +
                      "INNER JOIN CauseMarketer_Companies q ON q.CauseMarketerID = m.CauseMarketerID " +
                      "WHERE m.CauseMarketerID = " + cookieLogin.Value; 
  
  
          DataTable Results = Utils.SQLUtils.GetDataTable("TFOUNDATION", sql);
          DataRow FirstResult = Results.Rows[0];
  
          userFirstName.Text = FirstResult["FirstName"].ToString();
          userLastName.Text = FirstResult["LastName"].ToString();
          userCompanyName.Text = FirstResult["CompanyName"].ToString();
          userAddress.Text = FirstResult["Address1"].ToString();
          userAddress2.Text = FirstResult["Address2"].ToString();
          userCity.Text = FirstResult["City"].ToString();
          userZip.Text = FirstResult["ZipCode"].ToString();
  
  
  
      }
  </code></pre>