Web Pages - Class
ASP.NET Web Pages - Classes
ASP.NET Class Reference Manual
Method | Description |
---|---|
Convert string value to Boolean value (true/false) . If the string cannot be converted to true/false, false or other specified values are returned. | |
value) | Convert string value to date/time. Return DateTime. If the string cannot be converted to a date/time, MinValue or other specified value is returned.|
value) | Convert string value to decimal value. If the string cannot be converted to a decimal value, 0.0 or other specified value is returned.|
value) | Convert string value to floating point number. If the string cannot be converted to a floating point number, 0.0 or other specified value is returned.|
value) | Convert string value to integer. If the string cannot be converted to an integer, 0 or other specified value is returned.|
path [, param1 [, param2]]) | Create a browser-compatible URL from a local file path with an optional additional path part.|
value) | Rendersvalue Renders as HTML markup instead of rendering as HTML encoded output . |
Returns true if the value can be converted from a string to the specified type. | |
Returns true if the object or variable has no value. | |
Returns true if the request is a POST. (The initial request is usually a GET.) | |
Specifies the path to the layout page to apply to this page. | |
key], PageData[index], Page | Contains shared data between the currently requested page, layout page, and partial pages. You can use dynamic pages to provide attribute access to the same data.|
RenderBody() | (Layout pages) Renders the content of a content page that is not in any named area of the layout page any named sections. |
RenderPage(path, values) RenderPage(path[, param1 [, param2] ]) | Renders a content page using the specified path and optional extra data. You can get the value of additional parameters from PageData via position (instance 1) or key (instance 2). |
RenderSection(sectionName [, required = true|false]) | (Layout pages) Renders a named content area. Setting required makes a field required but not optional. |
Request.Cookies[key] | Get or set the value of HTTP cookie. |
Request.Files[key] | Gets The file uploaded in the current request. |
Request.Form[key] | Get the data posted in the form (as a string). Both Request.Form and Request.QueryString require [key] checks. |
Request.QueryString[key] | Get the data specified in the URL query string. Both Request.Form and Request.QueryString require [key] checks. |
Request.Unvalidated(key) Request.Unvalidated().QueryString|Form|Cookies|Headers[key] | Selectively disable request validation (form elements, query string values, cookies, header values). Request verification is turned on by default, preventing users from submitting tags or other potentially dangerous content. |
Response.AddHeader(name, value) | Add an HTTP server response header to the response. |
Response.OutputCache(seconds [, sliding] [, varyByParams]) | Caches Page output cache at the specified time. Set sliding to reset the access timeout for each page, and set varyByParams to cache different versions of the page for each different query string that requests the page. |
Response.Redirect(path) | Redirect the browser request to a new location. |
Response.SetStatus(httpStatusCode) | Set the HTTP status code sent to the browser. |
Response.WriteBinary(data [, mimetype]) | Write data Content response optional MIME type. |
Response.WriteFile(file) | Write file content response. |
@section(sectionName) { content } | (layout page) defines a named content area. |
Server.HtmlDecode(htmlText) | Decode an HTML-encoded string. |
Server.HtmlEncode(text) | Encodes the string that is rendered in the HTML markup. |
Server.MapPath(virtualPath) | Returns the physical path of the server for the specified virtual path. |
Server.UrlDecode(urlText) | Decode the URL text. |
Server.UrlEncode(text) | URL text encoding. |
Session[key] | Gets or sets a value that exists until the user closes the browser. |
ToString() | Displays the value of an object represented as a string. |
UrlData[index] | Get extra data from the URL (for example, /MyPage/ExtraData). |