Create custom ASP.net ajax non-visual client components

Source: Internet
Author: User
Tags net client

Based on a study of the Microsoft ASP.net Ajax 1.0 Framework, this article continues to discuss how to create a asp.net Ajax non-visual client component derived from the base class Sys.Component and to demonstrate its use in Web pages.

First, Introduction

In this article, we'll discuss how to create a asp.net Ajax non-visual client component that derives from the base class Sys.Component and will demonstrate its use in Web pages.

Specifically, you will learn how to achieve:

Use prototype design mode to define a class of non-visual components in JavaScript.

Registers a non-visual component as a class derived from the base class component.

Initializes the base class-component of the Non-visual component and invokes its method.

Create a property that can fire a change notification.

Create a complete Demo.Timer, non visual component.

This component is used in a Web page and is bound to its events.

Note that in addition to the methods described in this article, which derive from component, there are two other types of extended basic component functionality that are built into the client components in the ASP.net AJAX 1.0 framework asp.net Ajax client component objects: behavior derived from Sys.UI.Behavior and control derived from Sys.UI.Control. The following table summarizes the differences between Component,behavior and control.

In addition, to run the examples in this article, you need to have the following conditions:

a test site;

Install the Microsoft ASP.net AJAX 1.0 framework, no longer repeat here.

Second, the basic functions of non-visual client components

A asp.net ajax the Non-visual client component encapsulates the JavaScript code that will be used in the application. A typical example of a non-visual component is a timer component that fires events at a certain time.

By deriving from the component base class, your custom component can automatically inherit many of these features, including:



Related Article

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.