Web Pages is much often about Objects.
You have already seen some Page Object methods in use:
In the previous chapter you saw two Page Object properties being used (isPost, and Request):
| Method | Description |
|---|---|
| href | Builds a URL using the specified parameters |
| RenderBody() | Renders the portion of a content page that is not within a named section (In layout pages) |
| RenderPage(page) | Renders the content of one page within another page |
| RenderSection(section) | Renders the content of a named section (In layout pages) |
| Write(object) | Writes the object as an HTML-encoded string |
| WriteLiteral | Writes an object without HTML-encoding it first. |
| Property | Description |
|---|---|
| isPost | Returns true if the HTTP data transfer method used by the client is a POST request |
| Layout | Gets or sets the path of a layout page |
| Page | Provides property-like access to data shared between pages and layout pages |
| Request | Gets the HttpRequest object for the current HTTP request |
| Server | Gets the HttpServerUtility object that provides web-page processing methods |
The Page property of the Page Object, provides property-like access to data shared between pages and layout pages.
You can use (add) your own properties to the Page property:
The pages property is very helpful. For instance, it makes it possible to set the page title in content files, and use it in the layout file:
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.