exist
In the ASP.NET WebPages Class Reference Manual, we list some methods that need to be used, as well as descriptions of these methods.method | describe |
---|---|
AsBool(), AsBool(true|false) | Convert string value to boolean (true/false). If the string cannot be converted to true/false, false or other specified values are returned. |
AsDateTime(), AsDateTime( value ) | Convert a string value to a date/time. Return DateTime. If the string cannot be converted to a date/time, MinValue or other specified value is returned. |
AsDecimal(), AsDecimal( value ) | Converts a string value to a decimal value. If the string cannot be converted to a decimal value, 0.0 or other specified value is returned. |
AsFloat(), AsFloat( value ) | Converts a string value to a floating point number. If the string cannot be converted to a floating point number, 0.0 or other specified value is returned. |
AsInt(), AsInt( value ) | Convert a string value to an integer. If the string cannot be converted to an integer, 0 or other specified value is returned. |
Href( path [, param1 [, param2]] ) | Creates a browser-compatible URL from a local file path with an optional additional path part. |
Html.Raw( value ) | Renders values are rendered as HTML markup rather than 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. (The initial request is usually a GET.) |
Layout | Specifies the path to the layout page to apply to this page. |
PageData[ key ], PageData[ index ], Page | Contains shared data between the currently requested page, layout page, and partial page. 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 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) Presents a named content area. Setting required makes a field required but not optional. |
Request.Cookies[ key ] | Gets or sets the value of the 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 ] | Gets 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 ) | Adds an HTTP server response header to the response. |
Response.OutputCache( seconds [, sliding] [, varyByParams] ) | Caches Page output cache at a 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 browser requests to a new location. |
Response.SetStatus( httpStatusCode ) | Sets the HTTP status code sent to the browser. |
Response.WriteBinary( data [, mimetype] ) | Write data content in response to an optional MIME type. |
Response.WriteFile( file ) | Write the file content in response. |
@section( sectionName ) { content } | (Layout Page) Defines a named content area. |
Server.HtmlDecode( htmlText ) | Decode an HTML-encoded string. |
Server.HtmlEncode( text ) | Encodes strings rendered in HTML markup. |
Server.MapPath( virtualPath ) | Returns the physical path to the server for the specified virtual path. |
Server.UrlDecode( urlText ) | Decode 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 ). |