HtmlHelper.GenerateValidationMessage 方法

定义

生成验证消息。

protected:
 virtual Microsoft::AspNetCore::Html::IHtmlContent ^ GenerateValidationMessage(Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression, System::String ^ message, System::String ^ tag, System::Object ^ htmlAttributes);
protected virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateValidationMessage (Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, string message, string tag, object htmlAttributes);
abstract member GenerateValidationMessage : Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
override this.GenerateValidationMessage : Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
Protected Overridable Function GenerateValidationMessage (modelExplorer As ModelExplorer, expression As String, message As String, tag As String, htmlAttributes As Object) As IHtmlContent

参数

modelExplorer
ModelExplorer

ModelExplorer

expression
String

表达式。

message
String

验证消息。

tag
String

标记。

htmlAttributes
Object

一个 Object ,它包含 元素的 HTML 属性。 或者,一个 IDictionary<TKey,TValue> 包含 HTML 属性的实例。

返回

IHtmlContent

适用于