This article is from Appendix A of ASP. NET Ajax program design Article II: client-side Microsoft Ajax library.
ASP. NET Ajax provides a wide range of client JavaScript types, but its documentation is not complete enough to cover all types in the class library. Fortunately, Eilon Lipton has brought us a very useful tool-Asp. net Ajax JavaScript class browser, used to help view ASP.. Net Ajax client properties, methods, and events.
The ASP. Net Ajax JavaScript class browser can be downloaded in Eilon Lipton's blog (http://weblogs.asp.net/leftslipper/), which is itself a Web site written with ASP. NET Ajax.
First, extract the downloaded package to a directory. To view the types contained in the ASP. NET Ajax futures CTP script, we will then add Microsoft. Web. Preview. dll, that is, the type of ASP. NET Ajax CTP ures CTP.ProgramCopy the set to the bin \ directory of the web site.
Open the classbrowser. master file in the Web site and add reference to each script in ASP. NET Ajax futures CTP in its scriptmanager. See the bold section below:
<ASP: scriptmanager Runat= "Server" ID= "Scriptmanager1" Enablepartialrendering= "False">
<Scripts>
<ASP: scriptreference Name= "Microsoftajaxwebforms. js" />
<ASP: scriptreference Name= "Microsoftajaxtimer. js" />
<ASP: scriptreference Name= "Previewscript. js"
Assembly= "Microsoft. Web. Preview" />
<ASP: scriptreference Name= "Previewglitz. js"
Assembly= "Microsoft. Web. Preview" />
<ASP: scriptreference Name= "Previewdragdrop. js"
Assembly= "Microsoft. Web. Preview" />
<ASP: scriptreference Name= "Previewwebparts. js"
Assembly= "Microsoft. Web. Preview" />
<ASP: scriptreference
Path= "Scriptlibrary/ajaxclassbrowser. reflection. js" />
<ASP: scriptreference
Path= "Scriptlibrary/ajaxclassbrowser. classwriter. js" />
</Scripts>
</ASP: scriptmanager>
This completes the configuration of ASP. NET Ajax JavaScript class browser. Run the Web site. You can see that the navigation tree on the left of the page classifies the client type by namespace. Expand a namespace and select a type. The prototype Declaration of the client type is displayed in a way similar to the C # syntax on the right side of the page, it includes inheritance relationships of types, implementation interfaces, attributes, methods, and events. Shown in the A-1.
Figure A-1 ASP. NET Ajax JavaScript class Browser Interface
if necessary, you can also add the custom ASP. NET Ajax client type to the scriptmanager of the classbrowser. master file. Then, you can browse the custom type on the ASP. NET Ajax JavaScript class browser interface, which is no different from the client type built in ASP. NET Ajax.