CHAN Reference
Chan Home | Reference Home | Event Firing Order | web.config
Site
The Generic class holds a number of static helper functions
| Return Type | Name | Parameters | Description |
|---|---|---|---|
| string | UrlEncode | ( string s ) | Escapes the input string so that it is suitable for inclusion as a GET parameter or value |
| string | UrlDecode | ( string s ) | Converts a UrlEncoded string to raw text |
| string | HttpEncode | ( string s ) | Escapes the input string so that it is suitable for rendering into HTML |
| string | HttpDecode | ( string s ) | Converts a HttpEncoded string to raw text |
| string | Base64Encode | ( string s ) | Converts the input string into a base 64 encoded string |
| string | Base64Decode | ( string s ) | Converts a Base 64 Encoded string to raw text |
| string | MapPath | ( string s ) | Converts a virtual path to a physical path on the server. e.g. Converts "/foo" to "c:\inetpub\wwwroot\foo" |
| string | ReplacePaths | ( string s ) | Replaces occurences of [Chan_Root],[Frag_Root],[Http_Root] and [Site_Root] in a string with their equivalents as set in web.config |
| string | ResolvePaths | ( string s ) | Equivalent to calling MapPath( ReplacePaths( string s ) ) where the inner call results in a virtual path. e.g. Converts "[Frag_Root]/foo" to "c:\inetpub\wwwroot\App_Fragments\foo" |
| string | StripHtml | ( string s ) | Removes all HTML tags from the passed in string returning only the raw text. White space such as newlines is preserved. |
| string | Concat | ( string s0 ... string s9 ) | Overloaded function allowing you to specify up to ten strings to concatinate |
| string | RandomCharString | ( int NumChars ) | Returns a string of the specified length containing a random combination of [0-9][a-z][A-Z]. Uses System.Cryptography for proper randomness |
| System.Web.UI.Control | FindControl | (string id, System.Web.UI.ControlCollection col) | Recursively searches the passed in control collection and its children to find the control with the given ID. Returns null if not found. |