title: calling a VB.net function from javascript
body: <p>I need to find a way to call a vb.net function in my aspx page from javascript. I have a Jquery function that makes the .drop class .droppable, and whenever I drop a .draggable onto a drop target, my Jquery code successfully fires a java alert statement. All in pure javascript. What I need to do is some heavy math!</p>
  
  <p>I do understand that javascript exists client-side, ASP/VB exists server-side, and never the two shall meet. From google research, it seems like the ideal way to get what I need done, is to trigger an asynchronous postback in my update panel. I created a hidden button called "HiddenButton", and I also created a hidden label called "HiddenLabel". How do I get it to work so when I drop something, my javascript calls something that updates both the text in the HiddenLabel (so I can pass a value to server-side), and somehow fire the HiddenButton_click event?</p>
  
  <p>My current javascript goodness looks like this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;  
    $(document).ready(function() {  
  doReady();  
  
  var prm = Sys.WebForms.PageRequestManager.getInstance();  
  prm.add_endRequest(function(s, e) {  
      doReady();  
  });  
  });
  
  function doReady() {
  
  $('.drag').draggable({ revert: true, helper: 'clone' });
  $('.drop').droppable({
      tolerance: "touch", // Here should be a string
      drop: function() { alert('dropped'); }
  </code></pre>
  
  <p>This is where I think something needs to go to update the label and trigger the post-back, but I don't know what it is :(    </p>
  
  <pre><code>});
  
  } // End of do ready
  &lt;/script&gt;
  </code></pre>