Default Property
Returns the default style sheet.
public static System.Web.UI.MobileControls.StyleSheet Default {
get
}
Remarks
The default style sheet supports a number of styles. For more information about the default style sheet, see the Style Sheet section of the Styles documentation.
Example
The following example demonstrates how to use the Default property to retrieve the ForeColor and Font.Size property values of the default styles.
Sub Cmd_Click(o As [Object], ee As EventArgs)
'Retrieve the property values of Default styles.
Response.Write(("Forecolor property of ERROR Style is set to " + StyleSheet.Default("Error").ForeColor.ToString() + "
"))
Response.Write(("FontSize property of ERROR Style is set to " + StyleSheet.Default("Error").Font.Size.ToString() + "
"))
End Sub
[C#]
void Cmd_Click(Object o, EventArgs ee)
{
//Retrieve the property values of Default styles.
Response.Write("Forecolor property of ERROR Style is set to "
+ StyleSheet.Default["Error"].ForeColor.ToString() + "<br/>");
Response.Write("FontSize property of ERROR Style is set to "
+ StyleSheet.Default["Error"].Font.Size.ToString()+ "<br/>");
}
See Also
Applies to: StyleSheet Class