title: C# Function then Javascript Function on event (ASP.NET)
body: <p>I'm having a difficult time getting around AutoPostBack with ASP.NET components, and was hoping someone can help. I've looked through multiple queries but nothing is really helping.</p>
  
  <p>I have a 'Submit' button on my page that when clicked should do 2 things:<br>
  1. Run a server-side C# function that updates a bunch of <code>&lt;asp:Labels</code> in a div tag.<br>
  2. Run a javascript animation that moves stuff around and makes the <code>&lt;div</code> tag visible.</p>
  
  <p>My functions work just fine by themselves, however my issue is with autopostback. If I use an <code>&lt;asp:Button</code> the postback refreshes and the javascript animation is undone along with it. If I use an <code>&lt;input type="button"</code> tag I am unable to run both the C# and Javascript functions. I've tried the following:</p>
  
  <ol>
  <li><p><code>&lt;input type="button" runat="server" onclick="c#function" onclientclick="javascriptFunction(); return false;"</code><br>
  ** runat="server" seems to just enable postback on that button</p></li>
  <li><p><code>&lt;asp:Button</code><br>
  ** C# function uses Page.ClientScript.RegisterStartupScript to invoke javascript function, but postback defeats the animation.</p></li>
  </ol>
  
  <p>I'm hoping to keep the javascript animations as they make the interface very clean and intuitive, so any help in keeping it is greatly appreciated. Any suggestions?</p>