title: VB.NET calls Javascript function. How do I get javascript function to complete before VB.NET completes?
body: <p>In a web application I am using a button_Click method in VB.Net to occur when a button is clicked.</p>
  
  <p>I have the following line at the top of my VB.NET method:</p>
  
  <pre><code>ScriptManager.RegisterStartupScript(Me, Me.GetType(), "myFunction", "myFunction();", True)
  </code></pre>
  
  <p>I want that script to finish before my VB.NET script carries on. Basically, I have validation in my javascript that I want to complete before the VB.NET takes the "validated" data and inserts it into a database.</p>