Asp.net Ajax registration class

Source: Internet
Author: User

1. Register a namespace

Type. registernamespace ("Wallis ");

Is to add Wallis to the window, and then the namespace can be directly used anywhere (the window is global and can be omitted during use)

2. Registration

Wallis. Animal. registerclass ("Wallis. Animal ");

You can find
Type. Prototype. registerclass = function type $ registerclass (typename, basetype, interfacetypes)
Here, type points to a funtion object Wallis. animal, this object has a prototype method registerclass when it is created, which means ASP. net Ajax client framework maintains an internal object that contains all classes registered to the framework. This allows the user to execute the class reflection query during the runtime, which is similar to the class reflection query in. net. This also means that each class registered to the ASP. NET Ajax client framework retains its corresponding metadata information, such as the type name, in the internal domain such as _ typename. Therefore, you can execute runtime object reflection.

Javascript alone does not need to be registered, but some Ajax mechanisms cannot be used.

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.