TAILIEUCHUNG - Beginning Ajax with ASP.NET- P14

Beginning Ajax with P14: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. | Professional Library Notice the number of parameters that you re passing into the method. There are now five parameters where before there were only three. The server-side method accepts only three so how can this work Remember that this is actually a JavaScript proxy object that is created by the Pro library for you to use. Every proxy object that is created is created with a couple of overloads. An overload is a variation of a method using the same method name but with a unique set of parameters known as a signature. The signature is defined as the order and types of the parameters the method accepts. The proxy object gets created with the following signatures. string string string string string string callback string string string callback context Notice the last two parameters callback and context. callback is the name of the method that you want the response to be sent to. In this example you would have a problem if all you could work with in the callback method was the response from the server. You d have a problem because you need to set the value of the image tag and you wouldn t know what that image tag was. So Pro has a last parameter called context. Whatever object you pass in as the context parameter will be returned in the response object as its context property. Remember the response object has five properties value error request extend and context. Now you see where the context is helpful. The context basically gets a free ride from your execution point where you ask for the server method to be called into your callback method. It is common to name the callback function the same as the original function name with the _Callback appended to it. Take a look at this callback function. function ChangeMe_Callback response if null alert

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.