Class XFormControlBase
Base class for XForm input controls.
Inheritance
System.Object
XFormControlBase
Implements
System.Web.UI.IPostBackDataHandler
Assembly: EPiServer.XForms.dll
Version: 8.11.0
public abstract class XFormControlBase : WebControl, IPostBackDataHandler
Constructors
Declaration
public XFormControlBase()
Properties
A reference to the inner Label control. Used by control developers.
Declaration
protected Label InnerLabel { get; set; }
Property Value
Declaration
public string Label { get; set; }
Property Value
Type |
Description |
System.String |
|
The reference name for the control. This is equivalent to the model node for the control.
Declaration
public string Reference { get; set; }
Property Value
Type |
Description |
System.String |
|
If the control requires a value when submitting data.
Declaration
public virtual bool Required { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
The type of the input that will be used when validating posted values. If no type has been
specified this will be validated against the default type InvalidDefaultInputRegex.
Declaration
public virtual string Type { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
public virtual string Value { get; set; }
Property Value
Type |
Description |
System.String |
|
Gets the XFormControl that the control is contained in if any.
Declaration
public XFormControl XFormContainer { get; }
Property Value
Methods
AddAttributesToRender(HtmlTextWriter)
Declaration
protected override void AddAttributesToRender(HtmlTextWriter writer)
Parameters
Type |
Name |
Description |
System.Web.UI.HtmlTextWriter |
writer |
|
Used internally when parsing the object.
Declaration
protected override void AddParsedSubObject(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
CreateIDName creates a valid Id/name that must begin with a letter ([A-Za-z]) and may be
followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"),
and periods (".").
Declaration
public static string CreateIdName(string idName, bool replaceSpace, bool alternativeStart)
Parameters
Type |
Name |
Description |
System.String |
idName |
Name or Id to validate
|
System.Boolean |
replaceSpace |
True if spaces should be replaced by _
|
System.Boolean |
alternativeStart |
True if all allowed charachters is accepted to start with
|
Returns
Type |
Description |
System.String |
|
Declaration
protected string DecodeXmlStringValue(string originalValue)
Parameters
Type |
Name |
Description |
System.String |
originalValue |
|
Returns
Type |
Description |
System.String |
|
Declaration
protected string EncodeStringValue(string originalValue)
Parameters
Type |
Name |
Description |
System.String |
originalValue |
|
Returns
Type |
Description |
System.String |
|
Declaration
protected string EncodeXmlStringValue(string originalValue)
Parameters
Type |
Name |
Description |
System.String |
originalValue |
|
Returns
Type |
Description |
System.String |
|
Returns the name that will be used when rendering the control to html.
Declaration
protected string GetRenderName()
Returns
Type |
Description |
System.String |
Either the reference for the XForm field or an Unique ID.
|
Validates the data and returns if the data is valid or not.
Declaration
public bool IsValidInput()
Returns
Type |
Description |
System.Boolean |
If the control has a type defined this will be used for validation,
otherwise it will be validated against InvalidDefaultInputRegex
|
LoadPostData(String, NameValueCollection)
Used internally to control if a field has been updated.
Declaration
public virtual bool LoadPostData(string postDataKey, NameValueCollection postCollection)
Parameters
Type |
Name |
Description |
System.String |
postDataKey |
|
System.Collections.Specialized.NameValueCollection |
postCollection |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
protected override void OnInit(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
RaisePostDataChangedEvent()
Declaration
public virtual void RaisePostDataChangedEvent()
RenderAttributes(HtmlTextWriter)
Declaration
protected virtual void RenderAttributes(HtmlTextWriter writer)
Parameters
Type |
Name |
Description |
System.Web.UI.HtmlTextWriter |
writer |
|
RenderBeginTag(HtmlTextWriter)
Declaration
public override void RenderBeginTag(HtmlTextWriter writer)
Parameters
Type |
Name |
Description |
System.Web.UI.HtmlTextWriter |
writer |
|
RenderEndTag(HtmlTextWriter)
Declaration
public override void RenderEndTag(HtmlTextWriter writer)
Parameters
Type |
Name |
Description |
System.Web.UI.HtmlTextWriter |
writer |
|
RenderID(HtmlTextWriter)
Declaration
public virtual void RenderID(HtmlTextWriter writer)
Parameters
Type |
Name |
Description |
System.Web.UI.HtmlTextWriter |
writer |
|
RenderLabel(HtmlTextWriter)
Declaration
public virtual void RenderLabel(HtmlTextWriter writer)
Parameters
Type |
Name |
Description |
System.Web.UI.HtmlTextWriter |
writer |
|
RenderName(HtmlTextWriter)
Declaration
public virtual void RenderName(HtmlTextWriter writer)
Parameters
Type |
Name |
Description |
System.Web.UI.HtmlTextWriter |
writer |
|
RenderValue(HtmlTextWriter)
Declaration
public virtual void RenderValue(HtmlTextWriter writer)
Parameters
Type |
Name |
Description |
System.Web.UI.HtmlTextWriter |
writer |
|
Events
Declaration
public event EventHandler ValueChanged
Event Type
Type |
Description |
System.EventHandler |
|
Implements
System.Web.UI.IPostBackDataHandler