ASP. NET Component Model

Source: Internet
Author: User

Asp.net is the Web branch of. NET Framework .. Net Framework is completely originated from the hierarchical structure of object-oriented classes, covering all Programming Problems in the Windows operating system. Web ApplicationsProgramConsists of pages, the user requests these pages from the server, and then the server processes the page, with HTMLCode. The method for processing the requested resource varies with the server. If the resource has a. aspx extension, IIS delegates the Asp.net Runtime library system for processing.
The. ASPX page where the Asp.net Runtime Library will be requestedSource codeConvert to an instance of the. NET Framework class inherited from the page base class. In short, the running Asp.net page is an object, and some components (that is, server-side controls) are also objects.

Any element can be identified by ID and written for it. All the elements on the page are real components, not just parsed texts. This model is flexible and powerful in scalability.

Runat is available in: 1. Server Control:
(System.web.ui.html controls and System. Web. UI. webcontrols)
Ii. full-page mark:
<Title>, <link>, <body>, <span>, <div>, <font>, and <IFRAME> for example:
<Title ID = "thetitle" runat = "server"/>
<Body id = "thebody" runat = "server"/>
<SCRIPT runat = "server">
Void page_load (Object sender, eventargs e ){
Thetitle. innertext = "Pro Asp.net (CH 01 )";
Thebody. attributes ["bgcolor"] = "yellow ";
}
</SCRIPT>
Iii. meta tag:
The meta tag has no ending tag. For example:
<Meta id = "meta1" runat = "server" http-equiv = "refresh"/>
<SCRIPT runat = "server">
Void page_load (Object sender, eventargs e ){
Meta1.attributes ["content"] = "4; url = http://www.asp.net ";
}
</SCRIPT>
Generation: <meta id = "meta1" http-equiv = "refresh" content = "4; url = http://www.asp.net"> </meta>

4. Unknown Tag:
<Person id = "dinoe" runat = server/>
<SCRIPT runat = "server">
Void page_load (Object sender, eventargs e ){
Dinoe. attributes ["favoritefood"] = "T-bone steak ";
}
</SCRIPT>
Generation: <person id = "dinoe" favoritefood = "T-bone steak"> </person>

Reference: programming Microsoft ASP. NET [DINO Esposito]/proficient in ASP. NET Programming [Luo Bing and other translations]

 

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.