title: How to stop UpdatePanel from causing whole page postback?
body: <p>I am using .NET 3.5 and building pages inside of the Community Server 2008 framework.</p>
  
  <p>On one of the pages, I am trying to get an UpdatePanel working.</p>
  
  <p>I took a sample straight from ASP.NET website, <em>update a time in an UpdatePanel to current time by clicking a button,</em> but for some reason when I try and perform the function the whole page refreshes.</p>
  
  <p>Here is what I have:</p>
  
  <pre><code>protected void Button1_Click(object sender, EventArgs e)
  {
      Label1.Text = "Panel refreshed at " + DateTime.Now.ToString();
      Label2.Text = "Panel refreshed at " + DateTime.Now.ToString();
  }
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;asp:ScriptManager ID="ScriptManager1" runat="server"/&gt;
  
  &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
      &lt;ContentTemplate&gt;
          &lt;fieldset&gt;
              &lt;legend&gt;UpdatePanel&lt;/legend&gt;
              &lt;asp:Label ID="Label1" runat="server" Text="Panel created."&gt;&lt;/asp:Label&gt;&lt;br /&gt;
              &lt;asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /&gt;
          &lt;/fieldset&gt;
      &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  </code></pre>
  
  <p>Whenever I click the button, sure the panel updates - but the whole page posts back! I can see the whole page flashing. What the heck am I doing wrong?</p>
  
  <p>I am inside of a nested Masterpage, but I'm not sure if this is a problem. Could there be something in this Community Server framework that I'm using that causes all events to postback?</p>