This article is a summary, indicating that the source of the download video tutorial Ajax Composition 1. XHTML + css2. Dynamic Display and interaction dom3. Data Interaction and operation XML and javast4. asynchronous data acquisition xmlhttprequest5. binding and processing data Javascript
----------------------------------------
---------------------------------------- Ajax application
Submit 1. XMLHttpRequest ----> request
Return Analysis 2 and 3. server ----> data <---- Javascript
A simple example
Implement the function to input 2 numbers and return the sum of 2 numbers
How can I create a default code? Create a handler. ashx processing file
<% @ Page Language = "C #" autoeventwireup = "true" codefile = "default. aspx. cs" inherits = "_ default" %>
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml"> <% @ Webhandler Language = "C #" class = "handler" %>
Using system; using system. Web;
Public class handler: ihttphandler {public void processrequest (httpcontext context) {context. response. contenttype = "text/plain"; int result = convert. toint32 (context. request. querystring ["num1"]) + convert. toint32 (context. request. querystring ["num2"]); context. response. write (result );}
Public bool isreusable {get {return false ;}}
}
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/sendling/archive/2008/10/16/3085794.aspx