locked
how can I use the external style sheet in Mobile Web Form? RRS feed

  • Question

  • User1900435586 posted

        I am using Asp .Net 2.0. How can I use the external style sheet in Mobile Web Form?

    Saturday, August 25, 2007 6:58 AM

Answers

  • User113421904 posted

    Hi vik1987,

    To create an external style sheet in ASP.NET Mobile Web Pages, you need to create a user control in an .ascx file, and place a single StyleSheet control with a set of styles in it. Then, to refer to this file, place a StyleSheet control on a mobile page and set its ReferencePath property to the relative URL of the user control.

    Please check this for more details:

    http://msdn.microsoft.com/en-us/library/6854a8as.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 27, 2007 6:20 AM

All replies

  • User113421904 posted

    Hi vik1987,

    To create an external style sheet in ASP.NET Mobile Web Pages, you need to create a user control in an .ascx file, and place a single StyleSheet control with a set of styles in it. Then, to refer to this file, place a StyleSheet control on a mobile page and set its ReferencePath property to the relative URL of the user control.

    Please check this for more details:

    http://msdn.microsoft.com/en-us/library/6854a8as.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 27, 2007 6:20 AM
  • User1900435586 posted

    hi

              This type of stylesheet has lots of limitation. We can not use extra functionalities in .ascx file like css file.

     

    Monday, August 27, 2007 9:58 AM
  • User113421904 posted

    Hi vik1987,

    I'm not very sure of your exact requirment. But you can still use built-in styles and StyleSheet control for your ASP.NET mobile pages. This page has examples for different ways to use style sheets in ASP.NET mobile pages: 

    http://samples.gotdotnet.com/MobileQuickStart/(S(omppno550fb5mdv2bwxixcf4))/Default.aspx?url=doc/Styles.aspx

    Hope it helps.

    Tuesday, August 28, 2007 1:35 AM