Webpages Ref Classes
* * *
## ASP.NET Class Reference
| Method | Description |
| --- | --- |
| AsBool(), AsBool(true|false) | Converts a string value to a boolean (true/false). Returns false or another specified value if the string cannot be converted to true/false. |
| AsDateTime(), AsDateTime(_value_) | Converts a string value to a date/time. Returns DateTime. Returns MinValue or another specified value if the string cannot be converted to a date/time. |
| AsDecimal(), AsDecimal(_value_) | Converts a string value to a decimal value. Returns 0.0 or another specified value if the string cannot be converted to a decimal value. |
| AsFloat(), AsFloat(_value_) | Converts a string value to a float. Returns 0.0 or another specified value if the string cannot be converted to a float. |
| AsInt(), AsInt(_value_) | Converts a string value to an integer. Returns 0 or another specified value if the string cannot be converted to an integer. |
| Href(_path_ _[, param1 [, param2]]_) | Creates a browser-compatible URL from a local file path with optional additional path parts. |
| Html.Raw(_value_) | Renders _value_ as HTML markup instead of rendering it as HTML-encoded output. |
| IsBool(), IsDateTime(), IsDecimal(), IsFloat(), IsInt() | Returns true if the value can be converted from a string to the specified type. |
| IsEmpty() | Returns true if the object or variable has no value. |
| IsPost | Returns true if the request is a POST. (Initial requests are usually GET.) |
| Layout | Specifies the path of the layout page to be applied to this page. |
| PageData, PageData, Page | Contains shared data between the current request's page, layout page, and partial pages. You can use the dynamic page for attribute access to the same data. |
| RenderBody() | (Layout pages) Renders the content of a content page that is not in any named sections. |
| RenderPage(_path_,_values_) RenderPage(_path[, param1 [, param2]]_) | Renders a content page using the specified path and optional additional data. You can obtain the values of the additional parameters from PageData by position (instance 1) or by key (instance 2). |
| RenderSection(_sectionName [, required =_ true|false _]_) | (Layout pages) Renders a named content area. Set _required_ to make an area mandatory, not optional. |
| Request.Cookies | Gets or sets the value of an HTTP cookie. |
| Request.Files | Gets the files uploaded in the current request. |
| Request.Form | Gets data posted in a form (as a string). Both Request.Form and Request.QueryString require checking . |
| Request.QueryString | Gets data specified in the URL query string. Both Request.Form and Request.QueryString require checking . |
| Request.Unvalidated(_key_) Request.Unvalidated().QueryString|Form|Cookies|Headers | Selectively disables request validation (for form elements, query string values, cookies, header values). Request validation is enabled by default to prevent users from submitting markup or other potentially dangerous content. |
| Response.AddHeader(_name_, _value_) | Adds an HTTP server response header to the response. |
| Response.OutputCache(_seconds_ _[, sliding] [, varyByParams]_) | Caches the page output for a specified time. Set _sliding_ to reset the timeout on each page access, set _varyByParams_ to cache a different version of the page for each different query string requesting the page. |
| Response.Redirect(_path_) | Redirects the browser request to a new location. |
| Response.SetStatus(_httpStatusCode_) | Sets the HTTP status code sent to the browser. |
| Response.WriteBinary(_data_ _[, mimetype]_) | Writes _data_ content to the response with an optional MIME type. |
| Response.WriteFile(_file_) | Writes file content to the response. |
| @section(_sectionName_) { _content_ } | (Layout pages) Defines a named content area. |
| Server.HtmlDecode(_htmlText_) | Decodes an HTML-encoded string. |
| Server.HtmlEncode(_text_) | Encodes a string for rendering within HTML markup. |
| Server.MapPath(_virtualPath_) | Returns the server's physical path for the specified virtual path. |
| Server.UrlDecode(_urlText_) | Decodes URL text. |
| Server.UrlEncode(_text_) | Encodes URL text. |
| Session | 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 | Gets additional data from the URL (e.g., _/MyPage/ExtraData_). |
YouTip