Base Mobile Control Properties

The properties listed in the following table apply to all ASP.NET mobile controls. Some browsers do not support font settings for individual controls.

Properties

Description

Alignment

The alignment of the style. Its value can be expressed as one of the following enumerations:

  • NotSet

  • Left

  • Center

  • Right

BackColor

The color behind the text of the control. In a mobile control element, the color value can be set by using standard HTML color identifiers: the name of a color ("black" or "red"), or using an RGB value expressed in hexadecimal ("#ffffff").

DeviceSpecific

Sets or returns the <DeviceSpecific>/<Choice> construct if it exists.

FirstPage

Returns the first page of the form on which the specified control resides.

Font

Returns a FontInfo object that contains information about the font for the specified control.

FontSize

The size of the font. Its value can be expressed as one of the following enumerations:

  • Large

  • Normal

  • NotSet

  • Small

FontInfo

The text color of the control. Its value can be expressed as one of the following enumerations:

  • Bold

  • Italic

  • Name

  • Size

Form

Provides access to the containing form.

ID (inherited from Control)

Sets or returns the identifier for the style. The default value is null.

InnerText

Protected property. Returns the text that is inside the control. The value of this property can include a combination of text from all the child controls.

IsTemplated

Returns true if the specified control has a valid template set.

LastPage

Returns the last page of the form on which the specified control resides.

MobilePage

Returns the containing mobile page. The mobile page is the top-level container for a control.

Page (inherited from Control)

Returns the containing page. In the case of a mobile page, it returns the mobile page, but not as strongly typed as the MobilePage property.

Parent (inherited from Control)

Returns the object one level higher in the object hierarchy. Often, the parent is the container of the current object.

runat

Must be server for all mobile controls.

Style

Returns the <Style> element for the specified control.

StyleReference

Sets or returns the name of the style sheet for the mobile page. A non-null value in this property establishes the style for the control.

ViewState (inherited from Control)

Returns a dictionary of state information that allows you to save and restore the view state of a server control across multiple requests for the same page.

Visible (inherited from Control)

Sets or returns true if the specified control will be rendered on a mobile page.

VisibleWeight

Returns the approximate weight of the control, in characters. The value of this property is used in pagination.

Wrapping

Uses an enumerated value to determine whether the text wraps to the next line. Its value can be expressed as one of the following enumerations:

  • NotSet

  • Wrap

  • NoWrap