Class GlobalRadioButton
This radio button is much like the built in System.Web.UI.WebControls.RadioButton control, but unlike it, has a GroupName that can be global, ignoring naming containers.
Inheritance
Implements
Namespace: Mediachase.Commerce.Website.Controls
Assembly: Mediachase.Commerce.Website.dll
Version: 10.8.0Syntax
public class GlobalRadioButton : WebControl, IPostBackDataHandler
Remarks
Be very careful when using this control, as it is quite easy to break other controls on the page because of the disrespect for naming containers in the "name" attribute of the rendered html input.
Constructors
GlobalRadioButton()
Creates a new instance of the GlobalRadioButton class.
Declaration
public GlobalRadioButton()
Properties
AutoPostBack
Gets or sets a value indicating whether the state automatically posts back to the server when clicked.
Declaration
public virtual bool AutoPostBack { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Checked
Gets or sets a value indicating whether the control is checked.
Declaration
public virtual bool Checked { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
GlobalGroup
Gets or sets if the GroupName will span across naming containers on the page.
Declaration
public virtual bool GlobalGroup { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Set this property to true to enable the "global" functionality of the control. Set this property to false to make it behave like a normal RadioButton.
GroupName
Gets or sets the name of the group that the radio button belongs to.
Declaration
public virtual string GroupName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
OnClientClick
Declaration
public virtual string OnClientClick { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Text
Gets or sets the text label associated with the control.
Declaration
public virtual string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String |
TextAlign
Gets or sets the alignment of the text label associated with the control.
Declaration
public virtual TextAlign TextAlign { get; set; }
Property Value
Type | Description |
---|---|
System.Web.UI.WebControls.TextAlign |
UniqueGroupName
Gets the group name for the control as it will exist in the name attribute of the html.
Declaration
protected virtual string UniqueGroupName { get; }
Property Value
Type | Description |
---|---|
System.String |
ValueAttribute
Gets the content to be put in the html value attribute.
Declaration
protected virtual string ValueAttribute { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
OnCheckedChanged(EventArgs)
Raises the CheckedChanged event.
Declaration
protected virtual void OnCheckedChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
OnPreRender(EventArgs)
Overrides the OnPreRender method.
Declaration
protected override void OnPreRender(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs object that contains the event data. |
Render(HtmlTextWriter)
Overrides the Render method.
Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Web.UI.HtmlTextWriter | writer | The System.Web.UI.HtmlTextWriter object that receives the control content. |
RenderInputTag(HtmlTextWriter, String)
Renders the input tag portion of the control.
Declaration
protected virtual void RenderInputTag(HtmlTextWriter writer, string clientID)
Parameters
Type | Name | Description |
---|---|---|
System.Web.UI.HtmlTextWriter | writer | The writer. |
System.String | clientID | The client ID. |
RenderLabel(HtmlTextWriter, String, String)
Renders the label portion of the control.
Declaration
protected virtual void RenderLabel(HtmlTextWriter writer, string text, string clientID)
Parameters
Type | Name | Description |
---|---|---|
System.Web.UI.HtmlTextWriter | writer | The writer. |
System.String | text | The text. |
System.String | clientID | The client ID. |
Events
CheckedChanged
The event that occurs when the checked property has changed.
Declaration
public event EventHandler CheckedChanged
Event Type
Type | Description |
---|---|
System.EventHandler |