Analysis on ASP. NET page structure of ASP. NET Programming Model

Source: Internet
Author: User

What is the composition of ASP. NET pages in the ASP. NET programming model? What are the characteristics of ASP. NET programming model? Let's get started with him:

The ASP. NET Programming Model consists of three parts: Page commands, code, and page layout.

Page command: The page command establishes the running environment of the page and specifies how the HTTP Runtime library handles the page

Code: A handler that contains page and control events. If we hide the code, it will not appear.

Page Layout: The page layout indicates that the page framework includes server controls, text, and HTML tags.

Example of ASP. NET page for ASP. NET Programming Model:

 
 
  1. <%
  2. @ PageLanguage ="C #"
  3. % ><! -- ASP. NET page instruction for ASP. NET Programming Model -->
  4.  
  5. <Scriptrunat ="Server"><! -- ASP. NET page code of ASP. NET Programming Model -->
  6.  
  7. Voidbutton#click (Objectsender, EventArgse)
  8.  
  9. {
  10.  
  11. Label1.Text ="Clickedat"+ DateTime. Now. ToString ();
  12.  
  13. }
  14. </Script>
  15.  
  16. <Html> <! -- ASP. NET Programming Model-ASP. NET page layout -->
  17.  
  18. <Head>
  19.  
  20. <Title> Single-FilePageModel </title>
  21.  
  22. </Head>
  23.  
  24. <Body>
  25.  
  26. <Formrunat ="Server">
  27.  
  28. <Div>
  29. <Asp: Labelid ="Label1" 
  30.  
  31. Runat ="Server"Text ="Label">
  32.  
  33. </Asp: Label>
  34.  
  35. <Br/>
  36.  
  37. <Asp: Buttonid ="Button1" 
  38.  
  39. Runat ="Server" 
  40.  
  41. Onclick ="Button#click" 
  42.  
  43. Text ="Button">
  44.  
  45. </Asp: Button>
  46.  
  47. </Div>
  48.  
  49. </Form>
  50.  
  51. </Body>
  52.  
  53. </Html>

The ASP. NET page structure of the ASP. NET programming model is introduced here. I hope you can understand the ASP. NET page structure of the ASP. NET programming model.

  1. Analysis of ASP. NET annotations
  2. Analysis of ASP. NET Session usage
  3. HTTP protocol analysis of ASP. NET Programming Model
  4. ASP. NET Programming Model HTTP Working Principle
  5. HTTP protocol analysis of ASP. NET Programming Model

Related Article

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.