NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Base Web Control Properties

The properties listed in the following table apply to all Web controls.

Properties

AccessKey The control's keyboard accelerator key. Specify a single letter or number that the user should use while pressing ALT. For example, specify "K" if the user should press ALT+K to access the control. Access keys are not supported on all browsers.
Attributes The complete set of attributes for the control's persistence format.

This property is only used when programming; it cannot be set when declaring the control.

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

When programming, this property is set using [to be supplied]

BorderWidth The size of the control's border, if any, in pixels. This property may not work in downlevel browsers.
BorderStyle The control's border style, if any. Possible values are:
  • NotSet
  • None
  • Dotted
  • Dashed
  • Solid
  • Double
  • Groove
  • Ridge
  • Inset
  • Outset
  • When programming, this property is set using [to be supplied]
CSSClass The CSS class to assign to the control.
CSSStyle A collection of text attributes that will be rendered as a css style attribute on the outer tag of the control.

This property is only used when programming; it cannot be set when declaring the control.

Note   Any style values set via style properties (for example, BackColor) will automatically override a corresponding value in this collection. Values set using this property are not automatically reflected in the strongly-typed style properties.

Some controls support style objects that allow you to apply style properties to individual elements of the control. Those properties override any settings you make using the CSSStyle property.

Enabled Enables the control if set to true (the default) or disables it if set to false.
Font-Bold True if the control's text should be bold, false othewise. The default is false.

When programming, this property is set using the Font object and [to be supplied].

Font-Italic True if the control's text should be italicized, false othewise. The default is false.

When programming, this property is set using the Font object and [to be supplied].

Font-Name The font in which the text of the control is displayed. Some browsers do not support font settings for individual controls.

When programming, this property is set using the Font object and [to be supplied].

Font-Names A list of font faces, in order of preference. If a browser cannot render a particular font, it selects the next font in the list. Some browsers do not support font settings for individual controls.

When programming, this property is set using the Font object and [to be supplied].

Font-Overline True if the control's text should have a line above it, false othewise. The default is false.

When programming, this property is set using the Font object and [to be supplied].

Font-Size The size of the font, from 1 to 7 (in HTML sizes.) Some browsers do not support font settings for individual controls.

When programming, this property is set using the Font object and the FontUnit class.

Font-Strikeout True if the control's text should have a line through it, false othewise. The default is false.

When programming, this property is set using the Font object and [to be supplied].

Font-Underline True if the control's text should be underlined, false othewise. The default is false.

When programming, this property is set using the Font object and [to be supplied].

ForeColor The control's text color. This property may not work in some downlevel browsers.
Height The control's height in pixels. This property may not work in some downlevel browsers.
TabIndex The order of the control when the user tabs between controls. If this property is not set, the control's index is zero. Controls with the same tab index will be tabbed to in the order they are declared in the content. This property works in Microsoft Internet Explorer 4.0 and later.
ToolTip The text that appears when the user leaves the mouse pointer over the control. Tooltips do not work in all browsers.
Width The fixed width of the control. The default unit is characters. You can also express width as pixels (eg "100px") or percentage (eg "20%"). All browsers support character width, but not all support other units.

See Also

Web Forms Controls by Function |