title: Call Javascript function and return value from ASP .NET
body: <p>Lets say on my page I have this function:</p>
  
  <pre><code> function ReturnFoo(bar)
   {
     return bar.toString() + "foo";
   }
  </code></pre>
  
  <p>Now, I would like to have this called from ASP .NET, hopefully with the ASP .NET AJAX framework, as I am already using it in this codebase (I have already spent the 100k, might as well use it).</p>
  
  <p>Also, I would like to get back the output that is returned from this function and then assign it to a variable created on the server side. And this is restricted to ASP .NET 2.0</p>