Class wwWebControl

The wwWebControl class is the base controls for all other controls in the Web Connection WebControl framework. It provides the core functionality for most controls.

If you are a control developer you will want to take a close look at the control class to see how to override the base functionality of the Control Class.

Custom
  wwWebControl

Class Members

MemberDescription

AddAttribute

Adds an attribute to the Attributes collection with the optional ability to append to the existing attribute value if one exists by using the llAppend parameter.

o.wwWebControl.AddAttribute(lcKey,lcValue,llAppend)

AddControl

This method is used to add any child controls to this control.

o.AddControl(loCtl)

AddScriptAttribute

Adds JavaScript code to an attribute based script event like onclick. This method allows appending script so that scripts are added cumulatively.

o.wwWebControl.AddScriptAttribute(lcScriptingEvent,lcScript,llAppend)

AddStyleTag

Adds or changes a style tag on the control's Style property. If you're chaning style properties in code it's recommended you use this method rather than directly changing the Style property manually.

o.AddStyleTag(lcStyle,lcValue)

BindControlSource

Internal method used to bind a ControlSource to the ControlProperty of the control.

o.BindControlSource()

DataBind

Performs databinding on a specific control. The base implementation is an abstract method so you need to provide an implementation for each control you create.

o.DataBind()

Dispose

Key method for clearing state of a control.

o.Dispose()

FindControl

Returns a control in the control's immediate child collection by name.

o.FindControl(lcControlId,llRecursive)

FireEvents

Generic WebControl method that is used retrieve the Event Target information and tries to find and fire the event specified.

o.FireEvents(lcEventTarget)

GetCachedOutput

Internal method that retrieves the cached output by checking the cache. Returns "" if no cache hit is made.

o.GetCachedOutput()

HookupEvent

Attaches an event an event handler to a control event.

o.HookupEvent(lcEvent,loHandler,lcMethod)

LoadViewState

Internal implementation method that loads up control state from ViewState. Occurs prior to Post data processing.

o.LoadViewState()

OnInit

First event fired in the Page Pipeline. Called from the Init() of the control. This event always fires and you can use it to override any initiliazation behavior.

o.OnInit()

OnLoad

OnLoad fires once a control has been fully initialized. This means it has initialized and had its control state loaded either from ViewState or POST data.

o.OnLoad()

OnLoadControlState

OnLoadControlState fires when the control tries to retrieve it's state in a POST back. The default implementation doesn't do anything - each control must implement its own functionality.

o.OnLoadControlState()

OnLoadViewState

OnLoadViewState is called after Init and prior to reading POST data. This method retrieves any Viewstate data stored for this control and assigns it. The default implementation provides for most scenarios.

o.OnLoadViewState()

OnPreRender

Fires just before the Render() method and after Events have fired, so you can make any last minute changes to the page state before rendereing.

o.OnPreRender()

OnSaveViewState

Called after Render() has completed. This method by default handles picking up and encoding the ViewState.

o.OnSaveViewState()

PreserveProperty

PreserveProperty is used to save property values between PostPacks using ViewState.

o.PreserveProperty(lcProperty)

Process

Starts the Page Event Pipeline that starts firing the Event Sequence from OnInit through Dispose.

o.Process()

Render

The core method for each Web Control class that is responsible for creating the final HTML output for the control.

o.Render()

RenderControlError

This method is responsible for rendering Error icons/messages if an error occurs during unbinding.

o.RenderControlError()

ResolveUrl

Fixes up Urls based on an Application Relative path including support for ~ path syntax that injects the Application relative path into the URL.

o.ResolveUrl(lcUrl)

SaveViewState

Internal method that manages encoding ViewState for each control.

o.SaveViewState()

UnbindControlSource

Unbinds a Control Source from a Web Control back into the underlying Field. Works only for simple
binding.

o.UnbindControlSource()

UnbindData

UnbindData retrieves data from a Control and binds it back into its ControlSource.

o.UnbindData()

ValueOrExpression

Converts a value to a string and checks for expression syntax.

o.ValueOrExpression(lvValue)

WriteBaseTags

Writes out the basic tags used on a control.

o.WriteBaseTags(llSkipId, llNoWidthAndHeight)

WriteCachedOutput

Takes output and writes it into the cache. The framework takes care of naming the cachekey or uses the CacheKey you specified explicitly.

o.WriteCachedOutput(lcOutput)

WriteEnabledTags

Writes the Enabled and ReadOnly tags if they are set.

o.WriteEnabledTags()

WriteEncodedAttributeString

Writes an attribute value string that is properly encoded.

o.WriteEncodedAttributeString(lcValue)

WriteIdTags

Writes only the Name and ID tags.

o.WriteIdTags()

WriteStyleAndClassTags

Writes out the Style and Class tags for the control.

o.WriteStyleAndClassTags(llNoWidthAndHeight)

WriteUnitValue

Writes a measurement value as a string. If a numeric value is passed it's turned into a string with a px postfix for pixel size. String values are passed through and all others are transformed into a string.

o.WriteUnitValue(vUnit)

AllowedMarkupChildren

A comma delimited list of element names that are allowed as child elements of this control and can be used without specifying runat="server" or the full wwWeb<ControlClass> name.

Attributes

A collection of Attributes that are to be rendered on the control. Any attributed added is rendered into the HTML of the control.

AutoPostBack

Determines whether controls automatically post back

BackColor

The Background Color for the control.

BindingErrorMessage

An error message that is to be displayed when a bind back error occurs on the control.

CacheDuration

If this value is > 0 the output of this control is cacheable. Value is in seconds.

CacheKey

The optional name of the Cache key used if caching the output from the control.

CanContainLiterals

Determines whether a control is a container control that can contain literal content.

ChildControls

Child Controls of the current control.

Context

A reference to the Web Connection Process class. Provided for ASP.NET conceptual compatibility.

ControlIndex

Internally used index used to create a unique control ID when rendering list containers like the Repeater.

ControlSource

A ControlSource expression that is evaluated during databinding and assigned to the control's ControSourceProperty.

ControlSourceFormat

FoxPro Format String applied when a control source is bound to data. Expressions can be stock FoxPro format strings or any FoxPro or custom function

ControlSourceMode

Determines how the ControlSource is applied for inbound and outbound binding.

ControlSourceProperty

The control's property that the ControlSource is binding to.

ControlSourceType

Optional property that allows explicit specification of the type of the control source.

ControlSourceUnbindExpression

This optional property allows you to explicitly specify a separate ControlSource expression for unbinding back into the underlying data source. Use this if you need to bind to methods rather than properties or to read and write into separate underlying properties.

CssClass

A CSS class name applied to this control.

DefaultEvent

The Default Event that is fired for a given control if no event argument can be found.

DefaultProperty

Default property for a control that has embedded content. For example, a TextBox's content is mapped to the .Text property.

Enabled

Determines whether a control is enabled.

EnableViewState

Determines whether ViewState is enabled for this control.

ErrorMessageLocation

Determines the location of Error Messages for controls when using control unbinding.

ForeColor

ForeColor for this control if it applies.

Height

The height of the control. This value is either numeric or string with string preferrable.

ID

The ID/Name of the control.

IsContainerControl

Determines whether this control allows contained controls.

IsInputControl

Determines whether a control is used as an INPUT control and requires a NAME tag to be rendered.

IsPostBack

Determines whether the current request is in a PostBack. Generally this property should be checked only on the form.

lDisposeCalled

Internal flag that determines whether Dispose has been called on this control. Used to avoid duplicate Dispose calls.

lEndResponse

Flag that is set to tell that the Response output has completed. No further rendering needs to take place.

OverrideNamingContainer

This property can be set on a container control to force it to NOT generate an additional naming container for its UniqueId property. This can avoid contained control names like panelContent_txtName and instead generate the field as plain old txtName.

Page

Reference to the top level page object.

ParentControl

The immediate parent of the current control.

PostHtml

Html Text as a string the follows the control.

PreHtml

Html text as a string that preceeds the control.

PreservedProperties

A collection of properties of the control that are persisted into ViewState.

ReadOnly

Determines if a control is read only.

RequiresFormRef

Internal property that determines whether the control

Style

A CSS Style string that is applied to the control.

Tag

Generic string property that can be used to attach some state to a control.

Text

The 'value' of the control. This is the primary value used for display and assignment.

ToolTip

Sets the pop up tooltip for the control as set by title= on most controls

UniqueID

A Unique ID for the control which is embedded into the page this value includes container and index information. Any retrieval of form variables should be done using UniqueID values.

UserFieldName

The display fieldname for this control - optionallyused for error messages

ValidationExpression

Validation Expression that validates the value that as been unbound by the Unbind() method by Control Source Binding.

ViewState

ViewState is a collection of state values that are specific to a given control. Each control has its own ViewState and there's a 'global' viewstate on the Page object.

Visible

Determines if a control is visible. Invisible controls are not rendered at all!

Width

Width for the control. This value can be a numeric or string value - string is preferred. This value is mirrored by the Protected cWidth property which can be more efficient.


© West Wind Technologies, 1996-2024 • Updated: 02/24/16
Comment or report problem with topic