ReferencePath Property

Sets or returns a reference to a user control (.ascx file). The default value is null.

public string ReferencePath {


The style sheet on the page inherits the styles in a style sheet defined at the root level of the referenced user control. For example, if the style sheet on the user control has a property named Style1, the page can access Style1 as if it were in the style sheet on the page.


The following example demonstrates how to use the ReferencePath property to specify a user control containing a style sheet.

// Code  in an .aspx file.
<Mobile:StyleSheet id="Style1" ReferencePath="Mobile_style.ascx"
    runat="server" />
<mobile:Form id=WelcomeForm runat="server" stylereference="Style1"    
    title="Welcome" >
   <mobile:label runat=server Text=" Welcome " stylereference="title" />

// Mobile_style.ascx ( external stylesheet ).

<Mobile:Stylesheet runat=server>
    <Style name="Style1">
          <Choice Filter="isHTML32">
                //Add Code and controls
                //Add Code and controls

See Also

Applies to: Stylesheet Class