Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <%@ Page Language="C#" Inherits="test.AClass" EnableSessionState="true" AutoEventWireup="True" %>
  2.  
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6.         <script type="text/javascript" src="js/head.min.js"> </script>
  7.     <script type="text/javascript">
  8.     //cargar jquery
  9.     head.js("js/jquery-1.7.1.min.js");
  10.  
  11.     head.ready(function(){
  12.         var path = '<%= AjaxPath() %>';
  13.            
  14.             jQuery.ajax({
  15.                 type: "POST",
  16.                 url: path,
  17.                 data: '{"s":"World"}',
  18.                 beforeSend: function(xhr) {
  19.                     xhr.setRequestHeader("X-AjaxPro-Method", "HelloWorld");
  20.                 },
  21.                 success: function(s) {
  22.                     eval('var o = ' + s + ';');
  23.                     alert(o.value);
  24.                 }
  25.             });
  26.     });
  27.     </script>
  28. </head>
  29. <body>
  30.  
  31. </body>
  32.  
  33. </html>