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:
- <%
- @ PageLanguage ="C #"
- % ><! -- ASP. NET page instruction for ASP. NET Programming Model -->
-
- <Scriptrunat ="Server"><! -- ASP. NET page code of ASP. NET Programming Model -->
-
- Voidbutton#click (Objectsender, EventArgse)
-
- {
-
- Label1.Text ="Clickedat"+ DateTime. Now. ToString ();
-
- }
- </Script>
-
- <Html> <! -- ASP. NET Programming Model-ASP. NET page layout -->
-
- <Head>
-
- <Title> Single-FilePageModel </title>
-
- </Head>
-
- <Body>
-
- <Formrunat ="Server">
-
- <Div>
- <Asp: Labelid ="Label1"
-
- Runat ="Server"Text ="Label">
-
- </Asp: Label>
-
- <Br/>
-
- <Asp: Buttonid ="Button1"
-
- Runat ="Server"
-
- Onclick ="Button#click"
-
- Text ="Button">
-
- </Asp: Button>
-
- </Div>
-
- </Form>
-
- </Body>
-
- </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.
- Analysis of ASP. NET annotations
- Analysis of ASP. NET Session usage
- HTTP protocol analysis of ASP. NET Programming Model
- ASP. NET Programming Model HTTP Working Principle
- HTTP protocol analysis of ASP. NET Programming Model