ASP tutorials. NET +jquery Ajax usage
<%@ 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>
Previous Processing page
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);
});