title: Pass parameters to code behind function using JavaScript
body: <p>I'm trying to call a code-behind function inside JavaScript and pass a parameters to the code-behind function.</p>
  
  <p>For example:</p>
  
  <pre><code>&lt;script&gt; 
  var name; 
  &lt;% createUser(name) %&gt; 
  &lt;/script&gt;
  
  private void createUser(string Name)
  { // Do crazy stuff }
  </code></pre>
  
  <p>I'm doing this because some of the elements are dynamically created using jQuery, so I cannot access them in server side code. The example above is relatively simple and nothing close to what I'm trying to achieve, nevertheless, it does give you a good overview of my problem.</p>
  
  <p>Thanks!</p>