Including Post, get, Ajax
Frontend call CopyCodeThe Code is as follows: jquery. Post ("newdoajax. aspx", {max: 'n! ', Name: 'wsenmin'}, function (data) {alert (data )});
Jquery. Get ("newdoajax. aspx", {max: 'B! ', Name: 'wsenmin'}, function (data) {alert (data )});
VaR Superman = "max = I am JQ & name = It Is Ajax ";
Jquery. Ajax ({
Type: "Post ",
URL: "newdoajax. aspx ",
Data: Superman,
Success: function (MSG) {alert (MSG );}
});
C # code: (Save the following code as a newdoajax. aspx file) Copy code The Code is as follows: <% @ page Language = "C #" validaterequest = "false" enablesessionstate = "true" %>
<% @ Import namespace = "system. Data. sqlclient" %>
<% @ Import namespace = "system. Data" %>
<% @ Import namespace = "system. Configuration" %>
<% @ Import namespace = "system. Web. Security" %>
<% @ Import namespace = "system. Drawing" %>
<SCRIPT type = "text/C #" runat = "server">
Protected void page_loadcomplete (Object sender, eventargs E)
{
Response. clearcontent ();
Response. Clear ();
String YY = NULL;
Int COUNT = request. Form. count;
Int count2 = request. querystring. count;
Foreach (var cv in request. Form)
{
YY + = CV + ":" + request. Form [cv. tostring ()]. tostring () + "Ha is simple | ";
}
Foreach (var cv in request. querystring)
{
YY + = CV + ":" + request. querystring [cv. tostring ()]. tostring () + "easy to use. Wow | ";
}
Response. Write (yy. substring (0, YY. Length-4 ));
Response. End ();
}
</SCRIPT>