.NET Framework Class Library
ControlSkinID Property

Gets or sets the skin to apply to the control.

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)
<[%$TOPIC/6262k69w_en-us_VS_110_1_0_0_0_0%](False)> _
Public Overridable Property SkinID As [%$TOPIC/6262k69w_en-us_VS_110_1_0_0_0_1%]
public virtual [%$TOPIC/6262k69w_en-us_VS_110_1_0_1_0_1%] SkinID { get; set; }
virtual property [%$TOPIC/6262k69w_en-us_VS_110_1_0_2_0_1%]^ SkinID {
	[%$TOPIC/6262k69w_en-us_VS_110_1_0_2_0_2%]^ get ();
	void set ([%$TOPIC/6262k69w_en-us_VS_110_1_0_2_0_3%]^ value);
abstract SkinID : [%$TOPIC/6262k69w_en-us_VS_110_1_0_3_0_1%] with get, set
override SkinID : [%$TOPIC/6262k69w_en-us_VS_110_1_0_3_0_3%] with get, set
function get SkinID () : [%$TOPIC/6262k69w_en-us_VS_110_1_0_4_0_0%] 
function set SkinID (value : [%$TOPIC/6262k69w_en-us_VS_110_1_0_4_0_1%])

Property Value

Type: SystemString
The name of the skin to apply to the control. The default is Empty.

The style sheet has already been applied.

- or -

The Page_PreInit event has already occurred.

- or -

The control was already added to the Controls collection.


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

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

If the skin files in a theme directory do not contain a skin with the specified SkinID property, an ArgumentException exception is thrown at run time.

Version Information

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0