Asp.net basic article 2 server controls, client controls, and HTML Form Controls

Source: Internet
Author: User

First, explain the concepts of these two controls.

So-called Server Control

It is officially provided by Microsoft, such as textbox label dropdownlist, which can directly add events and properties.

The operation method is similar to the. NET control of winform.

1. Using this server control can easily develop a complex business logic, which is easier to use than JSP ssh.

2. AfterCodeYou can directly add the event of the control, eliminating the need to obtain the request, Judgment, processing and other steps, reducing the development cycle

3. pagination can be easily implemented, such as pagesponse and gridview. You do not need to write paging stored procedures, but do not need to judge them. You can use a few easy statements of code to easily implement paging.

4. Page logic separation. You can use the datalist repeter control to easily traverse the data in the result set and bind the data. And add some event processing ^_^

5. You can use skin to quickly modify the widget style.

6. Added in viewstate

 

 

HTML Form Control

Simply put, it is an HTML Tag, such as <input> <SELECT> <textarea>.

1. to interact with the server, the control must be submitted to the server through the action in the <form> form and received through the request.

2. The style must be changed using CSS.

3. Only JS response events

 

Client controls

That is, the HTML control is added with the runat = "server" attribute.

1. This attribute changes the identity immediately and can be accessed through this in The Post code.

2. You can easily use the C # method to obtain any properties of the client control.

3. You can change the style in HTML format at the same time.

4. Data will be added to viewstate in the same way as the server control.

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.