locked
How to integrate a stylesheet user control and a custom control? RRS feed

  • Question

  • User1447564980 posted

    Hello.

    I've a StyleSheet control (.ascx) with HeaderTemplate and FooterTemplate configurations. In the other custom control I made (a menu control) I've template containers for HeaderTemplate and FooterTemplate. My objective is to integrate the presentation configuration from the mobile StyleSheet with the contents of the menu control. Is is possible? How?

    For example, if you have the follow StyleSheet in a user control:

    <mobile:Stylesheet runat="server">
        <Style Name="MyForm" Font-Size="Small" Font-Name="Arial">
            <DeviceSpecific>
                <Choice Filter="isHTML32">
                    <HeaderTemplate>
                        <!-- presentation configuration like tables, etc. -->
                    </HeaderTemplate>
                    <FooterTemplate>
                        <!-- presentation configuration like tables, etc. -->
                    </FooterTemplate>
                </Choice>
            </DeviceSpecific>
    </mobile:Stylesheet>

    But, when you apply StyleSheet to a .aspx like the below, the asp.net mobile doesn't integrate what is configured in StyleSheets templates with other templates defined in the .aspx or in user controls ? Anyone?

    <mobile:form runat="server" id="testForm" StyleReference="MyForm">
        <DeviceSpecific>
            <Choice Filter="isHTML32">
                <HeaderTemplate>
                    <mobile:Label runat="server">Label</mobile:Label>
                </HeaderTemplate>
                <FooterTemplate>
                    <mobile:Label runat="server">Label</mobile:Label>
                </FooterTemplate>
            </Choice>
        </DeviceSpecific>
    </mobile:form>

    Thank you.
     

    Monday, November 26, 2007 7:42 AM

All replies

  • User-220040742 posted

    Don't understand why you specify the HeaderTemplate, FooterTemplate in the DeviceSpecific associated with "MyForm" Style. 

    My understanding is that the template should always put in the second part in your code.

     

    Monday, December 3, 2007 1:36 AM
  • User1447564980 posted

    And how you do that? My goal is to define the layout in the stylesheet and the contents in another control. 

    Tuesday, December 4, 2007 5:11 AM
  • User1447564980 posted

    Nobody made something similar to this?

    How you configure the presentation of your mobile sites? Within the controls?

    Thanks.
     

    Friday, December 7, 2007 12:28 PM