Getting started with Ajax

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.