TAILIEUCHUNG - Beginning Ajax with ASP.NET- P9

Beginning Ajax with P9:Thank you for purchasing Beginning Ajax with . We know that you have a lot of options when selecting a programming book and are glad that you have chosen ours. We’re sure you will be pleased with the relevant content and high quality you have come to expect from the Wrox Press line of books. | Chapter 4 You will notice the use of a handler when defining the URL for making the asynchronous request and appending the value for the arg parameter based on the drop-down list selection. GET http XmlHttp_Chap4 AsyncRequest arg custNumber true Finally the implementation of the server-side HTTP handler itself is shown in the following code block. This is the handler that receives the asynchronous call from your XMLHttpRequest object extracts the customer number or ID and then uses that to return an XML document containing only that customer s name and email address. This code resides within the file. @ WebHandler Language C Class AsyncRequestHandler using System using using public class AsyncRequestHandler IHttpHandler public void ProcessRequest HttpContext context Grab the URL parameters string param arg const string xmlData @ xml version encoding utf-8 root Customer name 0 name email 1 email Customer root string returnXML null switch param case 1 returnXML xmlData Big Bob big@ break case 2 returnXML xmlData Small Sammy small@ break case 3 returnXML xmlData Large Larry large@ break application xml returnXML public bool IsReusable get return false 96 The XMLHttpRequest Object In addition to using query string arguments as shown in the previous example you can also utilize the send method of the XMLHttpRequest object to specify some data to be sent with the server request as part of the request body. Previous examples have used the syntax null to initiate a request specifying null as the method argument. This argument represents the content to be sent along with the request as part of the request body. To indicate the data to be sent with the request you simply specify it as the method argument .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.