HtmlHelper.Encode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Encode(String) |
Returns an HTML-encoded string that represents the specified string by using a full encoding that is suitable for arbitrary HTML. |
Encode(Object) |
Returns an HTML-encoded string that represents the specified object by using a full encoding that is suitable for arbitrary HTML. |
Encode(String)
Returns an HTML-encoded string that represents the specified string by using a full encoding that is suitable for arbitrary HTML.
public string Encode (string value);
member this.Encode : string -> string
Public Function Encode (value As String) As String
Parameters
- value
- String
The string to encode.
Returns
An HTML-encoded string that represents the original string.
Applies to
Encode(Object)
Returns an HTML-encoded string that represents the specified object by using a full encoding that is suitable for arbitrary HTML.
public string Encode (object value);
member this.Encode : obj -> string
Public Function Encode (value As Object) As String
Parameters
- value
- Object
The object to encode.
Returns
An HTML-encoded string that represents the object.