1. AjaxJson.aspx Process business data and generate JSon data for JqueryRequest.aspx to call. The code is as follows:
protected void Page_Load(object sender, EventArgs e)
{
string u = Request["UserName"];
string p = Request["Password"];
string output = string.Format("'UserName':'{0}','Password':'{1}'", u, p);
Response .Write("[{");
Response.Write(output);
Response.Write("}]");
Response.End();
}
2. JqueryRequest.aspx
Request AjaxJson.aspx by clicking the button to obtain JSon data. The code is as follows:
http://www.w3.org/1999/xhtml">