SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 76 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

This control enables you to update either part of or an
entire web page at regular intervals; for example, you might want to update the
current value of stock prices every 30 seconds. You??™ll see how to use the Timer control
in the next chapter.
??? The third file, named MicrosoftAjaxWebForms.js, includes classes that support partial-
page rendering, that is, the functionality that allows portions of a page to be
updated asynchronously. Without that, the whole page is postbacked to the server.
Adding a Custom JavaScript Class
Now that you??™ve created your AJAX-enabled web site, you will create your own JavaScript
file that defines a namespace, which contains the class definition for a car. As you will see
in the next few sections, the AJAX Library brings object-oriented programming (OOP) to
JavaScript by providing namespaces, inheritance, interfaces, and other features. If you
are familiar with the OO paradigm, then the advantages are obvious. If not, you will start
to see how namespaces and inheritance make code simpler to write, debug, and understand.
To create the JavaScript file, right-click the project within Solution Explorer, and click
on Add New Item (see Figure 3-3).


Pages:
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88