Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 15th, 2007, 03:28 AM
Friend of Wrox
 
Join Date: Apr 2006
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with order of application of styles

Hi,

i'm testing the order of application when it comes to styling with skin and CSS files. I wrote that StylesheetTheme will be overruled by everything else (CSS, element styles and theme).

The red.css contains this:

.red
{
     color:Red;
}

1) the aspx file:

<head runat="server">
<link href="App_Themes/mytheme/red.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<asp:Label ID="Label1" runat="server" CssClass="red" Text="Label"></asp:Label>
</form>
</body>

This works: 'label' is red.

---------------------------------------------------------------------

2) Now with StyleSheetTheme:

In directory 'mytheme' there is a file green.skin which contains:

<asp:Label SkinID="lightgreen" runat="server" Text="label" ForeColor="lightgreen" ></asp:Label>
<asp:Label runat="server" Text="label" ForeColor="green" ></asp:Label>

 The aspx file:

<%@ Page Language="VB" StylesheetTheme="mytheme" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

<head runat="server"></head>
<body>
<form id="form1" runat="server">
<asp:Label ID="Label1" runat="server" CssClass="red" Text="Label"></asp:Label>
</form>
</body>

Now i expect that 'label' is red, but no: 'label' is green

Any explanation for this?

Thanks

Hertendreef







Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with styles toddw607 Javascript 3 June 3rd, 2008 12:37 PM
XP Visual Styles problem katsarosj VB.NET 2 April 14th, 2005 11:39 AM
SQL "Order By" problem bear88 SQL Language 1 April 12th, 2005 12:18 AM
Styles problem tsimsha HTML Code Clinic 9 November 17th, 2004 09:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.