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
Inherited Members
Namespace: MetaBuilders.WebControls
Assembly: SurveyProject.WebApplication.dll
Syntax
public class GlobalRadioButton : WebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, 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 |
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 |
Overrides
Render(HtmlTextWriter)
Overrides the Render method.
Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Web.UI.HtmlTextWriter | writer |
Overrides
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 | |
System.String | clientID |
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 | |
System.String | text | |
System.String | clientID |
Events
CheckedChanged
The event that occurs when the checked property has changed.
Declaration
public event EventHandler CheckedChanged
Event Type
Type | Description |
---|---|
System.EventHandler |
Explicit Interface Implementations
IPostBackDataHandler.LoadPostData(String, NameValueCollection)
Declaration
bool IPostBackDataHandler.LoadPostData(string postDataKey, NameValueCollection postCollection)
Parameters
Type | Name | Description |
---|---|---|
System.String | postDataKey | |
System.Collections.Specialized.NameValueCollection | postCollection |
Returns
Type | Description |
---|---|
System.Boolean |
IPostBackDataHandler.RaisePostDataChangedEvent()
Declaration
void IPostBackDataHandler.RaisePostDataChangedEvent()