InputExtensions.RadioButton InputExtensions.RadioButton Method

Definition

Overloads

RadioButton(HtmlHelper, String, Object) RadioButton(HtmlHelper, String, Object)

Returns a radio button input element that is used to present mutually exclusive options.

RadioButton(HtmlHelper, String, Object, Boolean) RadioButton(HtmlHelper, String, Object, Boolean)

Returns a radio button input element that is used to present mutually exclusive options.

RadioButton(HtmlHelper, String, Object, IDictionary<String,Object>) RadioButton(HtmlHelper, String, Object, IDictionary<String,Object>)

Returns a radio button input element that is used to present mutually exclusive options.

RadioButton(HtmlHelper, String, Object, Object) RadioButton(HtmlHelper, String, Object, Object)

Returns a radio button input element that is used to present mutually exclusive options.

RadioButton(HtmlHelper, String, Object, Boolean, IDictionary<String,Object>) RadioButton(HtmlHelper, String, Object, Boolean, IDictionary<String,Object>)

Returns a radio button input element that is used to present mutually exclusive options.

RadioButton(HtmlHelper, String, Object, Boolean, Object) RadioButton(HtmlHelper, String, Object, Boolean, Object)

Returns a radio button input element that is used to present mutually exclusive options.

RadioButton(HtmlHelper, String, Object) RadioButton(HtmlHelper, String, Object)

Returns a radio button input element that is used to present mutually exclusive options.

public static System.Web.Mvc.MvcHtmlString RadioButton (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value);
static member RadioButton : System.Web.Mvc.HtmlHelper * string * obj -> System.Web.Mvc.MvcHtmlString

Parameters

htmlHelper
HtmlHelper HtmlHelper

The HTML helper instance that this method extends.

name
String String

The name of the form field and the ViewDataDictionary key that is used to look up the value.

value
Object Object

The value of the selected radio button. The value is retrieved in this order - the ModelStateDictionary object, the value of this parameter, the ViewDataDictionary object, and lastly, a value attribute in the html attributes.

Returns

An input element whose type attribute is set to "radio".

Exceptions

The name parameter is null or empty.

RadioButton(HtmlHelper, String, Object, Boolean) RadioButton(HtmlHelper, String, Object, Boolean)

Returns a radio button input element that is used to present mutually exclusive options.

public static System.Web.Mvc.MvcHtmlString RadioButton (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value, bool isChecked);
static member RadioButton : System.Web.Mvc.HtmlHelper * string * obj * bool -> System.Web.Mvc.MvcHtmlString

Parameters

htmlHelper
HtmlHelper HtmlHelper

The HTML helper instance that this method extends.

name
String String

The name of the form field and the ViewDataDictionary key that is used to look up the value.

value
Object Object

The value of the selected radio button. The value is retrieved in this order - the ModelStateDictionary object, the value of this parameter, the ViewDataDictionary object, and lastly, a value attribute in the html attributes.

isChecked
Boolean Boolean

true to select the radio button; otherwise, false.

Returns

An input element whose type attribute is set to "radio".

Exceptions

The name parameter is null or empty.

RadioButton(HtmlHelper, String, Object, IDictionary<String,Object>) RadioButton(HtmlHelper, String, Object, IDictionary<String,Object>)

Returns a radio button input element that is used to present mutually exclusive options.

public static System.Web.Mvc.MvcHtmlString RadioButton (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
static member RadioButton : System.Web.Mvc.HtmlHelper * string * obj * System.Collections.Generic.IDictionary<string, obj> -> System.Web.Mvc.MvcHtmlString

Parameters

htmlHelper
HtmlHelper HtmlHelper

The HTML helper instance that this method extends.

name
String String

The name of the form field and the ViewDataDictionary key that is used to look up the value.

value
Object Object

The value of the selected radio button. The value is retrieved in this order - the ModelStateDictionary object, the value of this parameter, the ViewDataDictionary object, and lastly, a value attribute in the html attributes.

htmlAttributes
IDictionary<String,Object>

An object that contains the HTML attributes to set for the element.

Returns

An input element whose type attribute is set to "radio".

Exceptions

The name parameter is null or empty.

RadioButton(HtmlHelper, String, Object, Object) RadioButton(HtmlHelper, String, Object, Object)

Returns a radio button input element that is used to present mutually exclusive options.

public static System.Web.Mvc.MvcHtmlString RadioButton (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value, object htmlAttributes);
static member RadioButton : System.Web.Mvc.HtmlHelper * string * obj * obj -> System.Web.Mvc.MvcHtmlString

Parameters

htmlHelper
HtmlHelper HtmlHelper

The HTML helper instance that this method extends.

name
String String

The name of the form field and the ViewDataDictionary key that is used to look up the value.

value
Object Object

The value of the selected radio button. The value is retrieved in this order - the ModelStateDictionary object, the value of this parameter, the ViewDataDictionary object, and lastly, a value attribute in the html attributes.

htmlAttributes
Object Object

An object that contains the HTML attributes to set for the element.

Returns

An input element whose type attribute is set to "radio".

Exceptions

The name parameter is null or empty.

RadioButton(HtmlHelper, String, Object, Boolean, IDictionary<String,Object>) RadioButton(HtmlHelper, String, Object, Boolean, IDictionary<String,Object>)

Returns a radio button input element that is used to present mutually exclusive options.

public static System.Web.Mvc.MvcHtmlString RadioButton (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value, bool isChecked, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
static member RadioButton : System.Web.Mvc.HtmlHelper * string * obj * bool * System.Collections.Generic.IDictionary<string, obj> -> System.Web.Mvc.MvcHtmlString

Parameters

htmlHelper
HtmlHelper HtmlHelper

The HTML helper instance that this method extends.

name
String String

The name of the form field and the ViewDataDictionary key that is used to look up the value.

value
Object Object

The value of the selected radio button. The value is retrieved in this order - the ModelStateDictionary object, the value of this parameter, the ViewDataDictionary object, and lastly, a value attribute in the html attributes.

isChecked
Boolean Boolean

true to select the radio button; otherwise, false.

htmlAttributes
IDictionary<String,Object>

An object that contains the HTML attributes to set for the element.

Returns

An input element whose type attribute is set to "radio".

Exceptions

The name parameter is null or empty.

RadioButton(HtmlHelper, String, Object, Boolean, Object) RadioButton(HtmlHelper, String, Object, Boolean, Object)

Returns a radio button input element that is used to present mutually exclusive options.

public static System.Web.Mvc.MvcHtmlString RadioButton (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value, bool isChecked, object htmlAttributes);
static member RadioButton : System.Web.Mvc.HtmlHelper * string * obj * bool * obj -> System.Web.Mvc.MvcHtmlString

Parameters

htmlHelper
HtmlHelper HtmlHelper

The HTML helper instance that this method extends.

name
String String

The name of the form field and the ViewDataDictionary key that is used to look up the value.

value
Object Object

The value of the selected radio button. The value is retrieved in this order - the ModelStateDictionary object, the value of this parameter, the ViewDataDictionary object, and lastly, a value attribute in the html attributes.

isChecked
Boolean Boolean

true to select the radio button; otherwise, false.

htmlAttributes
Object Object

An object that contains the HTML attributes to set for the element.

Returns

An input element whose type attribute is set to "radio".

Exceptions

The name parameter is null or empty.

Applies to