Web Pages object
ASP.NET Web Pages -Objects
Web Pages are often related to objects.
Page Object
You have seen some of the Page object methods in use:
@RenderPage("header.cshtml")
@RenderBody()
@RenderBody()
In the previous chapters, you have seen two Page object properties (isPost and Request ):
If (isPost) {
if (Request["Choice"] != null {
if (Request["Choice"] != null {
Some Page object methods
Method | Description |
---|---|
Creates a URL using the specified value ##. | |
Renders a part of the content page that is not in the named area of the layout page. | ##RenderPage( |
Render the content of a certain page in another page | ##RenderSection( | section
Render. The contents of the named area of the layout page. | ##Write(object | )
#WriteLiteral | Priority is not to use HTML encoding when writing objects|
##Some Page object properties. |
Attribute
Description
If the client uses If the HTTP data transmission method is a POST request, true will be returned. | ##Layout |
---|---|
Provides similar property access to data shared between pages and layout pages | |
Obtained for the current HTTP request. HttpRequest object. | #Server |