title: Running a stored procedure in a SqlDataSource on button click
body: <p>I am building a C# ASP.NET page where I want to call a stored procedure in a database.</p>
  
  <p>I have setup a <code>SqlDataSource</code> which points to the stored procedure. Parameters are obtained from the Web's control directly (TextBox)</p>
  
  <p>I have a button, when the user clicks it it should run the stored procedure, so I was going to add code like this : </p>
  
  <pre><code>mySqlDataSource.run()
  </code></pre>
  
  <p>or </p>
  
  <pre><code>mySqlDataSource.exec()
  </code></pre>
  
  <p>or </p>
  
  <pre><code>mySqlDataSource.storedProcedure()
  </code></pre>
  
  <p>but of course none of these methods exist.</p>
  
  <p>How do I initial the stored procedure? and how do I get the value returned by the stored procedure please?</p>
  
  <p>Thank you!</p>