Questions about ASP.NET topics?

1) If I create a theme and a skin file and a css file for that theme, then the skinfile automatically loads the generated css file? What happens if you have multiple css files under a theme?

2) Do css files in themes make css files global? I created a global one, and the theme that had the css file did not change the background color to the one I had in the theme, but the theme that did not have the css file changed the background color to the one that was in the global css file.

3) Seems like skins and css files are the same? Can't I just create a theme and use css files within the themes instead of skins? Are there skins for asp.net server control only?

+2


source to share


3 answers


I don't like skinning and prefer to just use plain CSS. What skin is, but very limited. I say throw skin and stick to CSS files.



+4


source


There can be many theme folders in the App_Themes folder. ASP.Net theme can consist of many skin files and many css files.

  • Yes, the Skin file knows about the CSS file. When you apply a theme, your page will automatically know about all .css files in the theme.
  • I'm not sure. Testing is the only way to go.
  • No, .skin files are different from .css files. Yes, you can just use css files in the theme and skip skins. Yes, skins are for asp.net server control only.

Themes versus cascading style sheets

Themes are similar to cascading style sheets in that both themes and style sheets define a set of common attributes that can be applied to any page. However, themes differ from style sheets in the following ways:

  • Themes can define many properties of a control or page, not just style properties. For example, using themes, you can specify graphics for the TreeView control, the template layout of the GridView control, and so on.
  • Topics can include graphics.
  • Themes do not cascade style sheet style. By default, any property values โ€‹โ€‹defined in a theme referenced by the Page Theme property override property values โ€‹โ€‹that are declaratively set on the control unless you explicitly apply a theme using the StyleSheetTheme property. See the Priority Theme Settings section above for more information.
  • Only one theme can be applied per page. You cannot apply multiple themes to a page, unlike style sheets, where you can apply multiple style sheets.


Quote from: ASP.NET Themes and Skins Overview


My opinion:

Generally, if you have a good understanding of CSS, you don't really need .Skin files, but Themes are still useful.

+3


source


Themes in asp.net are a bit confusing, somewhat css and somewhat nifty.

Stick to regular css and create your own skin environment (ex: configured css folder) It's much easier to use things like jQuery plugins with regular css and it will be easier to work with designers who know normal css for cross-browser development.

+2


source







All Articles