ASP. NET control development (1)

Source: Internet
Author: User

In fact, I have been writing about the development of controls for a long time, and I have read many wonderful articles from my friends in the garden. However, I am not very familiar with the development of controls, and I am not very familiar with them, the articles written by some friends such as Li mengjun in the garden are quite good. Seeing their continuous learning, my heart is a bit exciting. I also want to learn and write articles to share with you;

When I wrote this article, I chatted with a friend about the development of controls. He said that MS controls are not good, but his opinion is that JS packaging is used in the project, it is better to become a control, but I gave him the answer that the control of MS is a combination of many people, and we can solve the problem in the project. the key is that we can achieve the desired effect on their overide on the basis of the controls provided by them. if Javascript is used in all our projects, the development and management of our projects will bring about great problems;

Well, let's take a look at the simplest example:

The function of this example is to convert the Text value of the control in uppercase and output the following on the page:

Code:

Private string _ later;

[Description ("converts lowercase letters to uppercase letters")]
[DisplayName ("Later")]
Public string Later
{
Get
{
Return _ later;
}
Set
{
_ Later = value. ToUpper ();
}
}

On the CS page, you can call WebBarButton1.Later = "aaa ";
Response. Write (WebBarButton1.Later );

On the page, we can see three uppercase values: AAA.
Let's write this simple example at the beginning. I am also a beginner, but I will continue to learn and share what I have learned with you;
ASP. NET controls are mainly inseparable from JS, CSS, and HTML. the first three types of DHTML are the most commonly used ones, indicating that WEB controls are packaged at a higher level, which makes it easier for us to use them, this is my understanding for beginners. If there is any bad place, I hope you can come up with it! Thank you very much.

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.