Custom ASP. NET Server controls and User Controls

Source: Internet
Author: User

The two are self-written. What is the difference? Under what circumstances should I write the server control and under what circumstances should I use the user control.

Server Control:

The compiled DLL is applicable to different websites and must be referenced only. However, it is difficult to develop and requires a lot of rewriting. The form is a class library. There is no interface during development.

User Control:

It is a file with the. ascx suffix. It is only applicable to the same website, improving reusability and enhancing encapsulation. However, it is easy to develop. You can drag the mouse to write a few lines of code, or even not write it. However, it is not suitable for multiple websites. If you want to share, you can only copy the control file to each website. The reusability between websites is not enough.

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.