Learning Asp.net control skills in observer Mode

Source: Internet
Author: User

In fact, the idea of Asp.net controls trigger events is nothing more than the observer mode.

With a series of delegates, an internal observer in Asp.net will execute actions of objects of interest once there is an external action.

For example, when the page automatically generates the button1_onclick method, the observer will also throw the triggered object to the object sender.

Sender, which many beginners are confused about, is actually a trigger object. From the perspective of the observer mode, it will be easy to understand.

The previous section uses the sender in page_load as the (sender as page) to upload

Although the soldiers are not fixed and the water is impermanence, after all, there must be a certain point of return. It is not difficult to grasp the rules.

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.