cas--handwriting The first step: HTML controls and Web server controls

Source: Internet
Author: User
Tags cas

itoo CAS I was responsible for leading the study for a period of time, seemingly quit to make, but it has been morbid, as the saying goes, the disease is to be cured, can not cure to find a way to be cured, The original road has been to find us in the wrong where, why not realize the vicious circle. In fact, we can jump out of this cycle, in another way to solve the problem.

          Now that the current cas No, sso Exit implementation is not possible, then we will use the single sign-on logic to write a set of their own cas html client control. Why not, now look at what the difference is between the two types of controls.

This goes back to the ASP .

ASP There are several controls ?

1 , HTML Control:

It's what we use. HTML language tags, which are not subject to server-side control, can only be JS and other language scripts and other programming languages to control. For example

    <inputtype= "button" id= "BTN" value= "button"/>

2 , HTML server Controls:

is actuallyHTMLcontrol is added based on therunat= "Server"The controls that make up the.They run in different ways., HTMLcontrol runs on the client,andHTMLserver controls are run on the server side of the. whenASPwhen the page executes, it checks that the callout has norunatattribute, if the callout is not set, thenHtmlThe callout is treated as a string and sent to the string stream waiting to be sent to the client, which is interpreted by the client's browser;Htmlmarked with settingsrunat= "Server"Properties,Pageobject puts the control into the controller, and the server-side code can control it until the control is executed and thenHtmlthe execution result of the server control is converted toHtmlannotation, and then sent to the client as a string stream to interpret.

      <inputid= "button" type= "button" value= "button" runat= "Server"/>

3. Web server controls: also known as A sp.net server Controls

is the basic element of WebForm programming and is unique to ASP. Instead of directly describing HTML elements, it produces one or more HTML controls in accordance with the client's situation. Such as:

<asp:button id= "Button2" runat= "Server" text= "button"/>


So

A What is the difference between Sp.net server controls and HTML server controls?

1. ASP. NET server controls provide a more unified programming interface, such as the Text property for each ASP.

2. A sp.net server Controls hide the difference between clients, so programmers can put more effort into the business, rather than consider whether the client's browser is IE or Firefox, or mobile devices.

3. The ASP. NET server control can be saved in the ViewState, so that the page can be saved in the process of uploading from the client to the server or downloading to the client from the server side.

4. Unlike the event-handling model, the event handling of HTML annotations and HTML server controls is on the client's page, while the ASP. NET server control is on the server.

Summarize:

The events for HTML markup and HTML server controls are triggered by the page, while the ASP. NET server control is sent by the page to the server, which is handled by the server. This is the first question I have, the server control will refresh the entire page after the click, and the client control will not, and our effect is to start a control does not refresh the entire form.

for the net this piece of things seems to be a little strange, for the things I have learned when used to use the Internet to check, can not be handy. Or to the knowledge we have learned not to wear up to form a net. So, learn, young, someday you will be happy for your own efforts ...

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

cas--handwriting The first step: HTML controls and Web server controls

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.