HtmlHelper.ValidationSummary 方法

定義

多載

ValidationSummary(String, Boolean, Object)

傳回 HTML div 元素,該元素具有屬性物件所定義的指定自訂屬性,以及包含來自模型狀態字典之驗證錯誤訊息的摘要訊息和未排序清單,選擇性地排除欄位層級錯誤。

ValidationSummary(String, Boolean, IDictionary<String,Object>)

傳回 HTML div 元素,其中包含屬性字典所定義的指定自訂屬性,以及包含來自模型狀態字典之驗證錯誤訊息的摘要訊息和未排序清單,選擇性地排除欄位層級錯誤。

ValidationSummary(String, Object)

傳回 HTML div 元素,其中包含屬性物件所定義的指定自訂屬性,以及包含來自模型狀態字典之所有驗證錯誤訊息的摘要訊息和未排序清單。

ValidationSummary(String, IDictionary<String,Object>)

傳回 HTML div 元素,其中包含屬性字典所定義的指定自訂屬性,以及包含來自模型狀態字典之所有驗證錯誤訊息的摘要訊息和未排序清單。

ValidationSummary()

傳回 HTML div 元素,其中包含模型狀態字典中所有驗證錯誤訊息的未排序清單。

ValidationSummary(Object)

傳回 HTML div 元素,其中包含屬性物件所定義的指定自訂屬性,且包含模型狀態字典中所有驗證錯誤訊息的未排序清單。

ValidationSummary(IDictionary<String,Object>)

傳回 HTML div 元素,其中包含屬性字典所定義的指定自訂屬性,且包含模型狀態字典中所有驗證錯誤訊息的未排序清單。

ValidationSummary(Boolean)

傳回 HTML div 元素,其中包含來自模型狀態字典的未排序驗證錯誤訊息清單,選擇性地排除欄位層級錯誤。

ValidationSummary(String)

傳回 HTML div 元素,其中包含摘要訊息和模型狀態字典中所有驗證錯誤訊息的未排序清單。

ValidationSummary(String, Boolean, Object)

傳回 HTML div 元素,該元素具有屬性物件所定義的指定自訂屬性,以及包含來自模型狀態字典之驗證錯誤訊息的摘要訊息和未排序清單,選擇性地排除欄位層級錯誤。

public System.Web.IHtmlString ValidationSummary (string message, bool excludeFieldErrors, object htmlAttributes);
member this.ValidationSummary : string * bool * obj -> System.Web.IHtmlString
Public Function ValidationSummary (message As String, excludeFieldErrors As Boolean, htmlAttributes As Object) As IHtmlString

參數

message
String

出現在驗證錯誤訊息清單之前的摘要訊息。

excludeFieldErrors
Boolean

true 表示從結果中排除欄位層級驗證錯誤訊息;false 則為 包含 和 欄位層級驗證錯誤訊息。

htmlAttributes
Object

包含元素之自訂屬性的物件。 這些屬性 (Attribute) 名稱和值是藉由檢查物件之屬性 (Property),透過反映所擷取而來。

傳回

代表驗證錯誤訊息的 HTML 標記。

適用於

ValidationSummary(String, Boolean, IDictionary<String,Object>)

傳回 HTML div 元素,其中包含屬性字典所定義的指定自訂屬性,以及包含來自模型狀態字典之驗證錯誤訊息的摘要訊息和未排序清單,選擇性地排除欄位層級錯誤。

public System.Web.IHtmlString ValidationSummary (string message, bool excludeFieldErrors, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
member this.ValidationSummary : string * bool * System.Collections.Generic.IDictionary<string, obj> -> System.Web.IHtmlString
Public Function ValidationSummary (message As String, excludeFieldErrors As Boolean, htmlAttributes As IDictionary(Of String, Object)) As IHtmlString

參數

message
String

出現在驗證錯誤訊息清單之前的摘要訊息。

excludeFieldErrors
Boolean

true 表示從結果中排除欄位層級驗證錯誤訊息;false 同時包含模型層級和欄位層級驗證錯誤訊息。

htmlAttributes
IDictionary<String,Object>

元素之自訂屬性的名稱和值。

傳回

代表驗證錯誤訊息的 HTML 標記。

適用於

ValidationSummary(String, Object)

傳回 HTML div 元素,其中包含屬性物件所定義的指定自訂屬性,以及包含來自模型狀態字典之所有驗證錯誤訊息的摘要訊息和未排序清單。

public System.Web.IHtmlString ValidationSummary (string message, object htmlAttributes);
member this.ValidationSummary : string * obj -> System.Web.IHtmlString
Public Function ValidationSummary (message As String, htmlAttributes As Object) As IHtmlString

參數

message
String

出現在驗證錯誤訊息清單之前的摘要訊息。

htmlAttributes
Object

包含元素之自訂屬性的物件。 這些屬性 (Attribute) 名稱和值是藉由檢查物件之屬性 (Property),透過反映所擷取而來。

傳回

代表驗證錯誤訊息的 HTML 標記。

適用於

ValidationSummary(String, IDictionary<String,Object>)

傳回 HTML div 元素,其中包含屬性字典所定義的指定自訂屬性,以及包含來自模型狀態字典之所有驗證錯誤訊息的摘要訊息和未排序清單。

public System.Web.IHtmlString ValidationSummary (string message, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
member this.ValidationSummary : string * System.Collections.Generic.IDictionary<string, obj> -> System.Web.IHtmlString
Public Function ValidationSummary (message As String, htmlAttributes As IDictionary(Of String, Object)) As IHtmlString

參數

message
String

出現在驗證錯誤訊息清單之前的訊息。

htmlAttributes
IDictionary<String,Object>

元素之自訂屬性的名稱和值。

傳回

代表驗證錯誤訊息的 HTML 標記。

適用於

ValidationSummary()

傳回 HTML div 元素,其中包含模型狀態字典中所有驗證錯誤訊息的未排序清單。

public System.Web.IHtmlString ValidationSummary ();
member this.ValidationSummary : unit -> System.Web.IHtmlString
Public Function ValidationSummary () As IHtmlString

傳回

代表驗證錯誤訊息的 HTML 標記。

適用於

ValidationSummary(Object)

傳回 HTML div 元素,其中包含屬性物件所定義的指定自訂屬性,且包含模型狀態字典中所有驗證錯誤訊息的未排序清單。

public System.Web.IHtmlString ValidationSummary (object htmlAttributes);
member this.ValidationSummary : obj -> System.Web.IHtmlString
Public Function ValidationSummary (htmlAttributes As Object) As IHtmlString

參數

htmlAttributes
Object

包含元素之自訂屬性的物件。 這些屬性 (Attribute) 名稱和值是藉由檢查物件之屬性 (Property),透過反映所擷取而來。

傳回

代表驗證錯誤訊息的 HTML 標記。

適用於

ValidationSummary(IDictionary<String,Object>)

傳回 HTML div 元素,其中包含屬性字典所定義的指定自訂屬性,且包含模型狀態字典中所有驗證錯誤訊息的未排序清單。

public System.Web.IHtmlString ValidationSummary (System.Collections.Generic.IDictionary<string,object> htmlAttributes);
member this.ValidationSummary : System.Collections.Generic.IDictionary<string, obj> -> System.Web.IHtmlString
Public Function ValidationSummary (htmlAttributes As IDictionary(Of String, Object)) As IHtmlString

參數

htmlAttributes
IDictionary<String,Object>

元素之自訂屬性的名稱和值。

傳回

代表驗證錯誤訊息的 HTML 標記。

適用於

ValidationSummary(Boolean)

傳回 HTML div 元素,其中包含來自模型狀態字典的未排序驗證錯誤訊息清單,選擇性地排除欄位層級錯誤。

public System.Web.IHtmlString ValidationSummary (bool excludeFieldErrors);
member this.ValidationSummary : bool -> System.Web.IHtmlString
Public Function ValidationSummary (excludeFieldErrors As Boolean) As IHtmlString

參數

excludeFieldErrors
Boolean

true 表示從清單中排除欄位層級驗證錯誤訊息;false 同時包含模型層級和欄位層級驗證錯誤訊息。

傳回

代表驗證錯誤訊息的 HTML 標記。

適用於

ValidationSummary(String)

傳回 HTML div 元素,其中包含摘要訊息和模型狀態字典中所有驗證錯誤訊息的未排序清單。

public System.Web.IHtmlString ValidationSummary (string message);
member this.ValidationSummary : string -> System.Web.IHtmlString
Public Function ValidationSummary (message As String) As IHtmlString

參數

message
String

出現在驗證錯誤訊息清單之前的訊息。

傳回

代表驗證錯誤訊息的 HTML 標記。

適用於