HtmlHelper.RadioButton HtmlHelper.RadioButton HtmlHelper.RadioButton Method

Definition

Overloads

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

Returns an HTML radio button control that has the specified name and value.

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

Returns an HTML radio button control that has the specified name, value, and default selected status.

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

Returns an HTML radio button control that has the specified name, value, and custom attributes defined by an attribute dictionary.

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

Returns an HTML radio button control that has the specified name, value, and custom attributes defined by an attribute object.

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

Returns an HTML radio button control that has the specified name, value, default selected status, and custom attributes defined by an attribute dictionary.

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

Returns an HTML radio button control that has the specified name, value, default selected status, and custom attributes defined by an attribute object.

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

Returns an HTML radio button control that has the specified name and value.

public System.Web.IHtmlString RadioButton (string name, object value);
member this.RadioButton : string * obj -> System.Web.IHtmlString
Public Function RadioButton (name As String, value As Object) As IHtmlString
Parameters
name
String String String

The value to assign to the name attribute of the HTML control element. The name attribute defines the group that the radio button belongs to.

value
Object Object Object

The value to assign to the value attribute of the element.

Returns

The HTML markup that represents the radio button control.

Exceptions
Sytem.ArgumentException Sytem.ArgumentException Sytem.ArgumentException

name is null or empty.

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

Returns an HTML radio button control that has the specified name, value, and default selected status.

public System.Web.IHtmlString RadioButton (string name, object value, bool isChecked);
member this.RadioButton : string * obj * bool -> System.Web.IHtmlString
Public Function RadioButton (name As String, value As Object, isChecked As Boolean) As IHtmlString
Parameters
name
String String String

The value to assign to the name attribute of the HTML control element. The name attribute defines the group that the radio button belongs to.

value
Object Object Object

The value to assign to the value attribute of the element.

isChecked
Boolean Boolean Boolean

true to indicate that the control is selected; otherwise, false.

Returns

The HTML markup that represents the radio button control.

Exceptions
Sytem.ArgumentException Sytem.ArgumentException Sytem.ArgumentException

name is null or empty.

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

Returns an HTML radio button control that has the specified name, value, and custom attributes defined by an attribute dictionary.

public System.Web.IHtmlString RadioButton (string name, object value, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
member this.RadioButton : string * obj * System.Collections.Generic.IDictionary<string, obj> -> System.Web.IHtmlString
Public Function RadioButton (name As String, value As Object, htmlAttributes As IDictionary(Of String, Object)) As IHtmlString
Parameters
name
String String String

The value to assign to the name attribute of the HTML control element. The name attribute defines the group that the radio button belongs to.

value
Object Object Object

The value to assign to the value attribute of the element.

htmlAttributes
IDictionary<String,Object>

The names and values of custom attributes for the element.

Returns

The HTML markup that represents the radio button control.

Exceptions
Sytem.ArgumentException Sytem.ArgumentException Sytem.ArgumentException

name is null or empty.

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

Returns an HTML radio button control that has the specified name, value, and custom attributes defined by an attribute object.

public System.Web.IHtmlString RadioButton (string name, object value, object htmlAttributes);
member this.RadioButton : string * obj * obj -> System.Web.IHtmlString
Public Function RadioButton (name As String, value As Object, htmlAttributes As Object) As IHtmlString
Parameters
name
String String String

The value to assign to the name attribute of the HTML control element. The name attribute defines the group that the radio button belongs to.

value
Object Object Object

The value to assign to the value attribute of the element.

htmlAttributes
Object Object Object

An object that contains custom attributes for the element. The attribute names and values are retrieved through reflection by examining the properties of the object.

Returns

The HTML markup that represents the radio button control.

Exceptions
Sytem.ArgumentException Sytem.ArgumentException Sytem.ArgumentException

name is null or empty.

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

Returns an HTML radio button control that has the specified name, value, default selected status, and custom attributes defined by an attribute dictionary.

public System.Web.IHtmlString RadioButton (string name, object value, bool isChecked, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
member this.RadioButton : string * obj * bool * System.Collections.Generic.IDictionary<string, obj> -> System.Web.IHtmlString
Public Function RadioButton (name As String, value As Object, isChecked As Boolean, htmlAttributes As IDictionary(Of String, Object)) As IHtmlString
Parameters
name
String String String

The value to assign to the name attribute of the HTML control element. The name attribute defines the group that the radio button belongs to.

value
Object Object Object

The value to assign to the value attribute of the element.

isChecked
Boolean Boolean Boolean

true to indicate that the control is selected; otherwise, false.

htmlAttributes
IDictionary<String,Object>

The names and values of custom attributes for the element.

Returns

The HTML markup that represents the radio button control.

Exceptions
Sytem.ArgumentException Sytem.ArgumentException Sytem.ArgumentException

name is null or empty.

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

Returns an HTML radio button control that has the specified name, value, default selected status, and custom attributes defined by an attribute object.

public System.Web.IHtmlString RadioButton (string name, object value, bool isChecked, object htmlAttributes);
member this.RadioButton : string * obj * bool * obj -> System.Web.IHtmlString
Public Function RadioButton (name As String, value As Object, isChecked As Boolean, htmlAttributes As Object) As IHtmlString
Parameters
name
String String String

The value to assign to the name attribute of the HTML control element. The name attribute defines the group that the radio button belongs to.

value
Object Object Object

The value to assign to the value attribute of the element.

isChecked
Boolean Boolean Boolean

true to indicate that the control is selected; otherwise, false.

htmlAttributes
Object Object Object

An object that contains custom attributes for the element. The attribute names and values are retrieved through reflection by examining the properties of the object.

Returns

The HTML markup that represents the radio button control.

Exceptions
Sytem.ArgumentException Sytem.ArgumentException Sytem.ArgumentException

name is null or empty.

Applies to