title: Using asp.net ajax method to stop the page from refreshing after a buttonclick in VS2012
body: <p>Using VS2012, I have a button that gets clicked to return some info to a textbox on the screen. I also have a label, label3, that is set to the following</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
      {
  
          Label3.Text = ("THE FIRST RUN RECORDED AT" + DateTime.Now.ToString(" hh:mm:ss tt"));
  
      }
  </code></pre>
  
  <p>Now naturally every time I press the button to return my information in the other part of the c#/web form it refreshes the <code>hh:mm:ss</code> to the current time. </p>
  
  <p>My question is - Where I can call my function to stop my label from refreshing when the button is clicked? </p>
  
  <p>The button calls this</p>
  
  <pre><code>protected void Button1_Click(object sender, EventArgs e)
      {
          WebService1 ws1 = new WebService1();
          Label2.Text = ws1.codes(TextBox1.Text);
      }
  </code></pre>
  
  <p>It just returns a string dependent on input.</p>