including Post,get,ajax
Front Call
Copy Code code 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 code 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 Good simple | | ";
}
foreach (var cv in request.querystring)
{
YY = + CV + ":" + REQUEST.QUERYSTRING[CV. ToString ()]. ToString () + "Good Simple Wow | |";
}
Response.Write (yy. Substring (0,yy. Length-4));
Response.End ();
}
</script>