System.Web 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Web.UI.Control System.Web.UI.IAttributeAccessor System.Web.UI.Themeable(true) System.Web.UI.PersistChildren(false, false) System.Web.UI.ParseChildren(true)

The class provides the properties, methods, and events that are common to all Web server controls. You can control the appearance and behavior of a Web server control by setting properties defined in this class. For example, the background color and font color of a control are controlled by using the and properties, respectively. On controls that can display a border, you can control the border width, the border style, and the border color by setting the , , and properties. The size of a Web server control can be specified by using the and properties.

The behavior of the control can be specified by setting certain properties. You can enable and disable a control by setting the property. The place of the control in the tab order is controlled by setting the property. You can specify a ToolTip for the control by setting the property.

Not all controls support every property defined in this class. For specific information about whether a property is supported, see the documentation for the specific control.

Some properties in this class render differently, depending on the browser. Some properties do not render at all, while others render, but have no effect. The property of the object determines the way in which a Web server control renders. For browsers that support HTML 4.0, the property will contain a regular object, and most properties will be rendered using HTML 4.0 style attributes. Browsers that are not known to support HTML 4.0 will use the object. This will automatically map the style attributes to any relevant HTML 3.2 tag attributes. In some cases, such as with the property, the style attributes will be converted into additional tags, such as <font> tags. In some cases, there will be no mapping performed. For specific information about how a property is rendered in different browsers, see the documentation for the specific property.

For a list of initial property values for an instance of , see the constructor.

Serves as the base class that defines the methods, properties and events common to all controls in the namespace.

- Constructor

  This constructor is used to initialize a new instance of the class that represents a Span HTML element.

  The following table shows the initial property value for an instance of .

  Property

  Initial Value

  TagKey

  The enumeration value.

  This constructor is not called directly. Instead, it is often called by the constructor of a derived class to initialize the property to the enumeration value.

  Initializes a new instance of the class that represents a Span HTML tag.

  1.0.5000.0
  2.0.0.0
- Constructor

  Use this constructor to create and initialize a new instance of the class using the specified HTML tag.

  The following table shows initial property values for an instance of .

  Property

  Initial Value

  TagKey

  The enumeration value.

  TagName

  The value of the parameter.

  This constructor is not called directly. Instead, it is often called by the constructor of a derived class to initialize the and properties.

  Initializes a new instance of the class using the specified HTML tag.

  An HTML tag.
  1.0.5000.0
  2.0.0.0
- Constructor

  Use this constructor to create and initialize a new instance of the class using the specified value.

  The following table shows the initial property value for an instance of .

  Property

  Initial Value

  TagKey

  The enumeration value specified by the parameter.

  Initializes a new instance of the class using the specified HTML tag.

  One of the values.
  1.0.5000.0
  2.0.0.0
- Property
  System.String To be added: an object of type 'string'

  Use the property to specify the keyboard shortcut for the Web server control. This allows you to navigate quickly to the control by pressing the ALT key and the key for the specified character on the keyboard. For example, setting the access key of a control to the string "D" indicates that the user can navigate to the control by pressing ALT+D.

  Only a single character string is allowed for the property. If you attempt to set this property to a value that is neither null, , nor a single character string, an exception is thrown.

  This property is supported only in Internet Explorer 4.0 and later.

  Gets or sets the access key that allows you to quickly navigate to the Web server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue("")
- Method
  System.Void ``

  To render attributes and styles for a Web Server control on the client, you typically call the and methods to insert each attribute and style individually to the output stream. To simplify the process, this method encapsulates all calls to the and methods for every attribute and style associated with the Web server control. All attributes and styles are inserted into the output stream in a single method call. This method is typically overridden by control developers in derived classes to insert the appropriate attributes and styles to the output stream for the class.

  The method cannot be used to insert client script. To use client script, see the class.

  Adds HTML attributes and styles that need to be rendered to the specified . This method is used primarily by control developers.

  A that represents the output stream to render HTML content on the client. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` To be added

  Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.

  A that represents the style to be copied. 1.0.5000.0 2.0.0.0
- Property
  System.Web.UI.AttributeCollection a

  The collection contains a collection of all attributes declared in the opening tag of a Web server control. This allows you to programmatically control the attributes associated with a Web server control. You can add attributes to the collection or remove attributes from the collection.

  This property is rendered with all attributes in the collection in the control’s opening tag, regardless of the browser settings. Not all browsers support every attribute that is rendered. The unsupported attributes are usually ignored by the browser.

  You cannot add client-side script to a instance using the collection. To add client-side script, use the property on the control.

  Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
- Property
  System.Drawing.Color a

  Use the property to specify the background color of the Web server control. This property is set using a object.

  This property will render for only certain controls. For example, , , , , and will render this property. It will also work for , and if their RepeatLayout property is RepeatLayout.Table, not RepeatLayout.Flow.

  In general, only controls that render as a <table> tag can display a background color in HTML 3.2, whereas almost any control can in HTML 4.0.

  For controls that render as a <span> tag (including , all validation controls, and list controls with their RepeatLayout property set to RepeatLayout.Flow), this property will work in Microsoft Internet Explorer version 5 and later, but not in Microsoft Internet Explorer version 4.

  Gets or sets the background color of the Web server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.WebColorConverter))
  System.ComponentModel.DefaultValue(typeof(System.Drawing.Color), "")
- Property
  System.Drawing.Color a

  Use the property to specify the border color of the Web Server control. This property is set using a object.

  The property will render only for certain controls. For example, the , , , , and controls will render this property. It will also work for the , , and controls, if their RepeatLayout property is set to RepeatLayout.Table, not RepeatLayout.Flow. However, it is rendered as the bordercolor attribute, which is not part of the HTML 3.2 standard. The bordercolor attribute works for Microsoft Internet Explorer version 3.0 or later, but not most other browsers.

  When the property is not set, the browser will use its default border color. Refer to your browser to determine its default color scheme.

  Gets or sets the border color of the Web control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.WebColorConverter))
  System.ComponentModel.DefaultValue(typeof(System.Drawing.Color), "")
- Property
  System.Web.UI.WebControls.BorderStyle To be added: an object of type 'BorderStyle'

  Use the property to specify the border style for the Web server control. This property is set using one of the enumeration values. The following table lists the possible values.

  Border Style

  Description

  NotSet

  The border style is not set.

  None

  No border

  Dotted

  A dotted line border.

  Dashed

  A dashed line border.

  Solid

  A solid line border.

  Double

  A solid double line border.

  Groove

  A grooved border for a sunken border appearance.

  Ridge

  A ridged border for a raised border appearance.

  Inset

  An inset border for a sunken control appearance.

  Outset

  An outset border for a raised control appearance.

  This property will not render on browsers earlier than Microsoft Internet Explorer 4 for any Web server control. There is no equivalent to it in HTML 3.2.

  Gets or sets the border style of the Web server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.BorderStyle.NotSet)
- Property
  System.Web.UI.WebControls.Unit To be added: an object of type 'Unit'

  Use the property to specify a border width for a control.

  This property does not work with all Web server controls. It applies only to controls that display as a table, such as and .

  This property is set with a object. If the property of the contains a negative number, an exception is thrown.

  The border width can be expressed only in pixels for browsers earlier than Microsoft Internet Explorer version 5. All unit types are supported in Microsoft Internet Explorer version 5 and later. Refer to the specific control for details.

  Gets or sets the border width of the Web server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(typeof(System.Web.UI.WebControls.Unit), "")
- Property
  System.Web.UI.WebControls.Style To be added: an object of type 'Style'

  The property encapsulates all properties of the class that specify the appearance of the control, such as and .

  Gets the style of the Web server control. This property is used primarily by control developers.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
- Property
  System.Boolean To be added: an object of type 'bool' To be added

  Gets a value indicating whether a object has been created for the property. This property is primarily used by control developers.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
- Method
  System.Void ``

  The method copies the , , , , and properties from the specified Web server control to the Web server control that this method is called from. This is commonly used in cases where a Web server control works by dynamically creating new controls while it is rendering and using the controls. This method is useful in this situation because it copies all properties of Web server controls not encapsulated by the object so they can be placed on the outermost control of a tag that is being rendered.

  Copies the properties not encapsulated by the object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.

  A that represents the source control with properties to be copied to the Web server control that this method is called from. 1.0.5000.0 2.0.0.0
- Method
  System.Web.UI.WebControls.Style

  The method is used to create the style object that is used internally to implement all style related properties. Derived classes can override this method to create a style that is appropriate to the class. This method is primarily used by control developers.

  Note Control developers should return a that derives from the that the base control returns. It cannot be assumed that the is of a particular Style type since a derived control may return a different type.

  Creates the style object that is used internally by the class to implement all style related properties. This method is used primarily by control developers.

  A that is used to implement all style-related properties of the control.

  1.0.5000.0
  2.0.0.0
- Property
  System.String To be added: an object of type 'string'

  Use the property to specify the CSS class to render on the client for the Web Server control. This property will render on browsers for all controls. It will always be rendered as the class attribute, regardless of the browser.

  This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.

  For example, suppose you have the following Web server control declaration:

  `<asp:TextBox id="TextBox1" ForeColor="Red" CssClass="class1" />`

  The following HTML is rendered on the client for the previous Web server control declaration:

  `<input type=text class="class1" style="ForeColor:red">`

  If you use cascading style sheets (CSS) to customize the appearance of a control, use either inline styles or a separate CSS file, but not both. Using both inline styles and a separate CSS file could cause unexpected results.

  On browsers that do not support CSS, setting the property will have no effect.

  Gets or sets the Cascading Style Sheet (CSS) class rendered by the Web server control on the client.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue("")
- Property
  System.Boolean To be added: an object of type 'bool'

  When the property of a control is set to false, the control typically appears dimmed. If the control is an input element, the browser prevents the user from clicking or typing in it. HTML elements that are rendered for a server control are marked as disabled by setting their disabled attribute or their CSS class attribute. For more information, see and .

  This property propagates down the control hierarchy. If you disable a container control, the child controls within that container are also disabled. For more information, see the property.

  In a custom composite control, this inheritance behavior does not apply to controls that have not yet created their child controls. You must either set the enabled state of the child controls when they are created, or override the property to call the method.

  Disabling a control only prevents interaction with the control by the user through the browser UI. It is possible for a user to craft a request that submits a postback that is processed by the page even if controls on the page are disabled. Before you process a postback request, check to make sure that the control is enabled and visible.

  Not all controls support this property. See the individual controls for details.

  This property cannot be set by themes or style sheet themes. For more information, see and ASP.NET Themes Overview.

  Gets or sets a value indicating whether the Web server control is enabled.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.Themeable(false)
  System.ComponentModel.DefaultValue(true)
  System.ComponentModel.Bindable(true)
- Property
  2.0.0.0
  System.ComponentModel.Browsable(true)
  System.Boolean To be added.

  The property indicates whether themes are enabled for a specified control. When the property is true, the theme directory for the application is searched for control skins to apply. If no skin for the particular control exists in the theme directory, skins are not applied.

  When the property is false, the theme directory is not searched and the contents of the property is not used.

  A control can override the value set by its parent control or the containing page. For example, if a parent control has the property set to false, you can selectively apply themes to child controls that are contained within the parent by setting the property to true on the individual child controls.

  Themes can be enabled at the page, container, or control level. When theming is disabled at the page or container level, themes are disabled for all controls that are contained by the page or container.

  Gets or sets a value indicating whether themes apply to this control.

- Property
  System.Web.UI.WebControls.FontInfo To be added: an object of type 'FontInfo'

  Use the property to specify the font properties of the Web Server control. This property includes subproperties that can be accessed declaratively in the form of (for example Font-Bold) or programmatically in the form of (for example Font.Bold).

  All but one subproperty will render in browsers prior to Microsoft Internet Explorer version 4 for all controls. They are: , , , , , , and (but only named font sizes, such as Small, Smaller, and so on, will work).

  Although these subproperties render in browsers prior to Microsoft Internet Explorer version 4, the HTML that is rendered is different than later browsers. Instead of rendering as style attributes, these subproperties are rendered as HTML elements, such as <b> and <font>.

  The one subproperty that will not render on earlier browsers for all controls is .

  Gets the font properties associated with the Web server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
- Property
  System.Drawing.Color a

  Use the property to specify the foreground color of the Web server control. The foreground color is usually the color of the text. This property will render on browsers earlier than Microsoft Internet Explorer version 4 for all controls, except the , , and .

  On browsers earlier than Microsoft Internet Explorer version 4, this property is rendered as <font> tags.

  Gets or sets the foreground color (typically the color of the text) of the Web server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.WebColorConverter))
  System.ComponentModel.DefaultValue(typeof(System.Drawing.Color), "")
- Property
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
  System.Boolean To be added.

  The property returns true when the instance has attribute name/value pairs. The attribute pairs can be set either in the property or in the view state.

  Gets a value indicating whether the control has attributes set.

- Property
  System.Web.UI.WebControls.Unit To be added: an object of type 'Unit'

  Use the property to specify the height of the Web server control.

  This property does not render for all controls in browsers earlier than Microsoft Internet Explorer version 4. Controls that do not render this property in earlier browsers include , , , and any validation controls. The , and also do not render this property in earlier browsers when their RepeatLayout property is set to RepeatLayout.Flow. Furthermore, only unit types of Pixel and Percentage are supported in earlier browsers.

  Because this property is nonstandard HTML, Web server controls that display as a table, such as and , do not support this property in browsers earlier than Microsoft Internet Explorer version 4.

  To set the property to a unit type other than the default of Pixel, you must create a new unit type specific to the unit type you want. For example, to set a control's property to a percentage value of 100, you could do the following:

  myWebControl.Width = Unit.Percentage(100);

  For more information on the unit types available for the property, see the class.

  Gets or sets the height of the Web server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(typeof(System.Web.UI.WebControls.Unit), "")
- Property
  2.0.0.0
  System.Boolean To be added.

  This is a read-only property. If you want to disable a control, you set its property to false.

  If a control is not contained by another control, the value of the property is always the same as the value of the property.

  The property has a value that is different from the property if a control is a child of another control and if all the following circumstances are true:

  The value of the property or the property of the parent control is false.

  The property of the child control is set to true.

  In this situation, the child control inherits the disabled state of the parent control. The property of the child control returns false to indicate that the control is disabled even though the child control was not explicitly disabled by setting its property to false. The parent control itself might have its property set to true but might inherit the disabled state from its parent, and so on.

  When ASP.NET renders HTML elements for a server control, it marks the elements as disabled by setting their disabled attribute or their CSS class attribute. For more information, see and .

  Gets a value indicating whether the control is enabled.

- Method
  System.Void ``

  This method is used primarily by the .NET Framework infrastructure and is not intended to be used directly from your code. However, control developers can override this method to specify how a custom server control restores its view state. For more information, see ASP.NET State Management Overview.

  The method restores the view-state information that was saved during a previous request. The class overrides the base method to handle the , , and properties.

  Restores view-state information from a previous request that was saved with the method.

  An object that represents the control state to restore. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` To be added

  Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.

  A that represents the style to be copied. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  The method is used primarily by control developers.

  The method sends the Web control to the specified instance. Override this method to send your custom server control to the client.

  The method first calls the method, then the method, and finally the method to send the control to the client.

  Renders the control to the specified HTML writer.

  The object that receives the control content. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  This is made public so other controls can render multiple controls in between the opening and closing tags of a Web server control.

  Renders the HTML opening tag of the control to the specified writer. This method is used primarily by control developers.

  A that represents the output stream to render HTML content on the client. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  Override the method to render the contents of the control between the begin and end tags. The default implementation of this method renders any child controls.

  If your control has child controls, you must either call the base method or call the at the point where you want the child controls to be rendered to the text writer.

  Renders the contents of the control to the specified writer. This method is used primarily by control developers.

  A that represents the output stream to render HTML content on the client. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  This is made public so other controls can render multiple controls in between the opening and closing tags of a Web server control.

  Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.

  A that represents the output stream to render HTML content on the client. 1.0.5000.0 2.0.0.0
- Method
  System.Object

  The method is used primarily by control developers.

  View state is the cumulative values of the properties for a server control. These values are placed automatically in the property for the server control, which is an instance of the class. The property value is then persisted to a string object after the save state stage of the life cycle for the server control. For more information, see Introduction to the ASP.NET Page Life Cycle.

  When view state is saved, this string object is returned to the client as a variable that is stored in a hidden HTML input element. When you author custom server controls, you can improve efficiency by overriding the method and modifying the property for your server control. For more information, see ASP.NET State Management Overview.

  Saves any state that was modified after the method was invoked.

  An object that contains the current view state of the control; otherwise, if there is no view state associated with the control, null.

  1.0.5000.0
  2.0.0.0
- Property
  2.0.0.0
  System.ComponentModel.Browsable(true)
  System.String To be added.

  Skins available to a control are contained in one or more skin files in a theme directory. The property specifies which of these skins to apply to the control. A skin is specific to a particular control; you cannot share skin setting between controls of different types.

  If you do not set the property, a control uses the default skin if one is defined. For example, if a skin without an ID is defined for an control, then that skin applies to all controls that do not explicitly reference a skin by ID and that are not set to disable theming. If a skin with an ID is defined for an control, then that skin applies to only controls whose is set to that ID.

  If the skin files in a theme directory do not contain a skin with the specified , an exception is thrown at runtime.

  Gets or sets the skin to apply to the control.

- Property
  System.Web.UI.CssStyleCollection a

  Use the collection to manage the style attributes rendered in the outer tag of the Web server control. This property will render on all browsers for all controls.

  Browsers that do not support style attributes will ignore the rendered HTML.

  Any style values set through the strongly typed style properties (for example, BackColor="Red") will automatically override a corresponding value in this collection.

  Values set in this collection are not automatically reflected by the strongly typed style properties.

  Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
- Method
  1.0.5000.0
  2.0.0.0
  System.String `` To be added.

  The method is an explicit interface member implementation. It can be used only when the instance of the class is cast to an interface.

  Gets an attribute of the Web control with the specified name.

  The value of the attribute.

- Method
  1.0.5000.0
  2.0.0.0
  System.Void `` `` To be added.

  The method is an explicit interface member implementation. It can be used only when the instance of the class is cast to an interface.

  Sets an attribute of the Web control to the specified name and value.

  The value component of the attribute's name/value pair.
- Property
  System.Int16 To be added: an object of type 'short'

  Use the property to specify or determine the tab index of a Web server control on the Web Forms page. When you press the Tab key, the order in which the Web server controls receive focus is determined by the property of each control. When a page is initially loaded, the first item that receives focus when the Tab key is pressed is the address bar. Next, the controls on the Web Forms page are tabbed to in ascending order, based on the value of the property of each control, starting with the smallest positive, nonzero value. If multiple controls share the same tab index, the controls will receive focus in the order they are declared on the Web Forms page. Finally, controls that have a tab index of zero are tabbed to in the order they are declared.

  Only controls with a nonzero tab index will render the tabindex attribute.

  You can remove a Web Server control from the tab order by setting the property to a negative value.

  This property is supported only in Internet Explorer 4 and later.

  Gets or sets the tab index of the Web server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(0)
- Property
  System.Web.UI.HtmlTextWriterTag a

  Use the property to determine the value that is associated with this Web server control. This property is used primarily by control developers.

  Gets the value that corresponds to this Web server control. This property is used primarily by control developers.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
- Property
  System.String To be added: an object of type 'string'

  Use the property to determine the name of the control tag associated with this Web server control. This property is used primarily by control developers.

  Gets the name of the control tag. This property is used primarily by control developers.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
- Property
  System.String To be added: an object of type 'string'

  Use the property to specify the custom text that is displayed when the mouse pointer hovers over the Web server control.

  This property is rendered for all browsers. However, only Microsoft Internet Explorer will display this property as a ToolTip. All other browsers will ignore this property.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets the text displayed when the mouse pointer hovers over the Web server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.Localizable(true)
  System.ComponentModel.DefaultValue("")
- Method
  System.Void

  The method is used primarily by control developers.

  The marks the starting point at which to begin tracking and saving changes to the view state for the control. The method is called automatically by ASP.NET when a server control is initialized.

  Causes the control to track changes to its view state so they can be stored in the object's property.

  1.0.5000.0
  2.0.0.0
- Property
  System.Web.UI.WebControls.Unit To be added: an object of type 'Unit'

  Use the property to specify the width of the Web server control.

  This property does not render for all controls in browsers earlier than Microsoft Internet Explorer version 4. Controls that do not render this property in earlier browsers include , , , and any validation controls. The , and also do not render this property in earlier browsers when their RepeatLayout property is set to RepeatLayout.Flow. Furthermore, only unit types of Pixel and Percentage are supported in earlier browsers.

  Because this property is nonstandard HTML, Web server controls that display as a table, such as and , do not support this property in browsers earlier than Microsoft Internet Explorer version 4.

  To set the property declaratively to a unit type other than the default of Pixel, you must create a new unit type specific to the unit type you want. For example, to set a control's property to a percentage value of 100, you could do the following:

  myWebControl.width = Unit.Percentage(100);

  For more information on the unit types available for the property, see the class.

  Gets or sets the width of the Web server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(typeof(System.Web.UI.WebControls.Unit), "")