HtmlHelper.GenerateRadioButton 方法

定义

生成单选按钮。

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

参数

modelExplorer
ModelExplorer

ModelExplorer

expression
String

表达式。

value
Object

值。

isChecked
Nullable<Boolean>

如果选中单选按钮。

htmlAttributes
Object

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

返回

IHtmlContent

适用于