DefaultHtmlGenerator.GenerateCheckBox 方法

定义

生成输入 < 类型="checkbox".../ > 元素。

public:
 virtual Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ GenerateCheckBox(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression, Nullable<bool> isChecked, System::Object ^ htmlAttributes);
public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateCheckBox (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, bool? isChecked, object htmlAttributes);
abstract member GenerateCheckBox : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * Nullable<bool> * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
override this.GenerateCheckBox : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * Nullable<bool> * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
Public Overridable Function GenerateCheckBox (viewContext As ViewContext, modelExplorer As ModelExplorer, expression As String, isChecked As Nullable(Of Boolean), htmlAttributes As Object) As TagBuilder

参数

viewContext
ViewContext

ViewContext当前范围的 实例。

modelExplorer
ModelExplorer

ModelExplorerexpression

expression
String

表达式名称,相对于当前模型。

isChecked
Nullable<Boolean>

复选框元素的初始状态。

htmlAttributes
Object

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

返回

TagBuilder

TagBuilder输入类型 < ="checkbox".../ 元素 > 的实例。

实现

适用于