title: Assigning C# variable value using javascript variable in code behind
body: <p>I am trying to access the script variable <code>pic</code> and assign it to another variable in C#, say hidden field <code>hdn</code>. The script below is also placed on the same code behind page for some reason. I can directly access the hidden field here. But how do I assign it value from the script variable?</p>
  
  <pre><code> &lt;script type=\"text/javascript\"&gt;
     $(document).ready(function() {
       $.get('&lt;%=completeURL%&gt;', 
       function(d) {
         $(d).find('entry').each(function(){
           var $entry = $(this);
           var pic = $entry.find('content').attr('src');
           alert(pic);
         });
       });
     });
   &lt;/script&gt;
  </code></pre>