HtmlHelper.AttributeEncode 方法

定義

多載

AttributeEncode(Object)

將指定的屬性值轉換成 HTML 編碼字串。

AttributeEncode(String)

將指定的屬性值轉換成 HTML 編碼字串。

AttributeEncode(Object)

將指定的屬性值轉換成 HTML 編碼字串。

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

參數

value
Object

要編碼的物件。

傳回

HTML 編碼字串。 如果值參數是 null 或空白,這個方法會傳回空字串。

適用於

AttributeEncode(String)

將指定的屬性值轉換成 HTML 編碼字串。

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

參數

value
String

要編碼的字串。

傳回

HTML 編碼字串。 如果值參數是 null 或空白,這個方法會傳回空字串。

適用於