DefaultHtmlGenerator.GenerateRadioButton 方法

定义

生成输入 < 类型="radio" > 元素

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

参数

viewContext
ViewContext

ViewContext当前范围的 实例。

modelExplorer
ModelExplorer

ModelExplorerexpression

expression
String

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

value
Object

给定单选按钮的值

isChecked
Nullable<Boolean>

是否选中单选按钮

htmlAttributes
Object

Object 个包含路由参数的 。 通过检查 的属性,通过反射检索参数 Object 。 这 Object 通常是使用初始 Object 值表达式语法创建的。 或者, IDictionary<TKey,TValue> 包含路由参数的实例。

返回

TagBuilder

实现

适用于