In this article,we will get date from use ajax with jquery.First we must include jQuery in the head of our page,here is the jquery website.
The code like this:
1 | <script type="text/javascript" src="js/jquery-1.3.2.min.js" ></script> |
once we done this,and we can begin to work using AJAX in Jquery.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | $.ajax({ type: "get",//define the type of request for example: POST/GET. dataType:"html",//format the data being received is in. (HTML, XML, JSON, script etc..) url: "getInfo.aspx?id="+id, //the URL to make the request to cache:false, beforeSend: function(XMLHttpRequest){ // }, success: function(data,textStatus){ alert(data); }, complete: function(XMLHttpRequest, textStatus){ // }, error: function(){ // } }); |
getInfo.aspx.cs
1 | Response.Write("OK"); |


