Re: calling style sheets



Hi jrl,

From your description, you're using ASP.NET Theme feature and include some
css style sheets in Theme (which will be applied on page), however, you
found the css class can not be resolved on page, correct?

According to the App_Themes folder and style*** path (also the <link ...>
tag syntax), I found the following problems:

** For ASP.NET theme, you need to assigne a certain Theme value for page in
addition to enabling Theme, e.g.

<%@ Page Language="C#" ............ EnableTheming="true" Theme="Theme1" %>

** You can add multiple Themes into App_Themes folder and each theme has
all its content(skins or stylesheets) in the subfolder of their name. e.g.

/App_Themes/
/Theme1
stuffs for Theme1
/Theme2
stuffs for Theme2


** For css stylesheets, if you want a certain Theme include some css
styles, just put the css style*** file into the folder of that Theme. And
at runtime the page will automatically reference those css stylesheets(as
long as you've applied the theme on that page):

here are some further articles about using Theme in ASP.NET:

#ASP.NET Themes and Skins Overview
http://msdn2.microsoft.com/en-us/library/ykzx33wh.aspx

#Themes In ASP.NET 2.0
http://www.odetocode.com/Articles/423.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: msdnmg@xxxxxxxxxxxxxx

==================================================
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response

from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take

approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution.

The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump

analysis issues. Issues of this nature are best handled working with a
dedicated Microsoft Support

Engineer by contacting Microsoft Customer Support Services (CSS) at

http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.







--------------------
X-Trace-PostClient-IP: 70.67.40.71
From: "jrl" <jrl@xxxxxxxxxxxxxxxx>
Newsgroups: microsoft.public.vsnet.general
Subject: Re: calling style sheets


Sorry, I didn't make it clearer that the error "The class or CssClass
value
is not defined" comes up like a tool tip when I hover over the CssClass,
like over pageheader in the following code:
<div class = "pageheader" >
where pageheader is defined in the css style*** as

.pageheader
{
background-color: #F3F194;
color: #5A5AA5;
}

Also, I notice that when I used the enabletheming, I could set the
property
of a control, in the properties panel, and select the cssclass from a
dropdown. Now that I use the linked style***, I don't get any style
options in the properties panel for any control.

So how can I use the linked reference to the style*** (<link
rel="Style***" ...>), and still get the utility I had with enabletheming
(<%@ Master EnableTheming="true" ....>)?


"jrl" <jrl@xxxxxxxxxxxxxxxx> wrote in message
news:d53Aj.53475$pM4.21522@xxxxxxxxxxxx
At first I learned to call a style *** by the command
EnableTheming, as in
<%@ Master EnableTheming="true" Language="C#" AutoEventWireup="true"
CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
Using this form to call the style *** in the App_Themes folder worked
fine.

But then I needed to break my style*** into smaller chunks, so it was
recommended that I use the following form within the head section.
<link rel="Style***" type="text/css" media="screen"
href="~/App_Themes/screen.css"

Now I notice the references to styles, are generating an interpreter
warning "The class or CssClass value is not defined" when I view the
source code, even though it does load the linked style*** and
implements
the styles when it generates the webpage.

Is this normal? (that it would warn this error) or am I missing
something
in order to use this function?



.


Loading