HtmlHelper.AttributeEncode 方法

定義

多載

AttributeEncode(Object)

傳回 HTML 編碼的字串,這個字串表示使用最小的編碼方式指定的物件,此編碼方式僅適用於以引號括起來的 HTML 屬性。

AttributeEncode(String)

傳回 HTML 編碼的字串,這個字串表示使用最小的編碼方式指定的字串,此編碼方式僅適用於以引號括起來的 HTML 屬性。

AttributeEncode(Object)

傳回 HTML 編碼的字串,這個字串表示使用最小的編碼方式指定的物件,此編碼方式僅適用於以引號括起來的 HTML 屬性。

public string AttributeEncode (object value);
member this.AttributeEncode : obj -> string
Public Function AttributeEncode (value As Object) As String

參數

value
Object

要編碼的物件。

傳回

表示物件的 HTML 編碼字串。

適用於

AttributeEncode(String)

傳回 HTML 編碼的字串,這個字串表示使用最小的編碼方式指定的字串,此編碼方式僅適用於以引號括起來的 HTML 屬性。

public string AttributeEncode (string value);
member this.AttributeEncode : string -> string
Public Function AttributeEncode (value As String) As String

參數

value
String

要編碼的字串。

傳回

表示原始字串的 HTML 編碼的字串。

適用於