473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

VS 2005 Theming?

Maybe I don't get the whole theming thing... but here is what I'm
trying to do:

I have a App_Themes directory with a Theme named "Standard." Under
this theme a CSS named "standard.css" and also have a folder named
Images (which contains header_left.jpg and header_right.jpg).

In my project, I created a new directory called "Masterpages" and it
contains a master page named "Standard.master."

Also in my project, I created a directory called "Controls" which
contains a Web User Control named "Header.ascx" with a code behind of
"Header.ascx.cs".

I also have a file in the base directory named "default.aspx" with a
"default.aspx.cs" code behind page.

Pretty simple setup.

Now, in the Header control I've added an ASP Table control that
contains 1 row and 2 columns, 1 column is justified left, the other
right. Both columns have an ASP Image control within them. For
simplicty sake, I set the ImageURL on one image to
"images/header_left.jpg" and the ImageURL on the right image control to
"images/header_right.jpg" in the design view.

Now, I place this Header control on the Standard.master page (cause I
want it to show up on every page). I set the Header control to
EnableTheming to true in the properties.

I then associate the default.aspx to the Standard.master page. I set
the theme on the default.aspx page to "Standard" in the properties
pane.

When I run this project, the default.aspx can not find any of the
images and when I look at the source code it actually has a src on the
image of "controls/images/header_left.jpg" and
"controls/images/header_right.jpg" (not the path to the images).

What am I doing wrong that the images aren't being themed here?

I've even tried creating a propery so that I can se the ImageURLs from
the master page so that it might pass the correct path to control, but
that gives me the same results.

Am I missing something here?

Dec 13 '05 #1
2 1167
I didn't spend too much time analyzing your problem but as soon as I saw
your pathing it reminded me to inform you of the "root path operator" which
is used only on controls that runat="server" and as I recall on
directories...

~/controls/images/header_left.jpg

There's also a fair bit to be learned about StyleSheet Themes and the
application of style to controls. You may need to do some more searching and
finding of articles to read as it is a bit confusing.
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/


<ss*******@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Maybe I don't get the whole theming thing... but here is what I'm
trying to do:

I have a App_Themes directory with a Theme named "Standard." Under
this theme a CSS named "standard.css" and also have a folder named
Images (which contains header_left.jpg and header_right.jpg).

In my project, I created a new directory called "Masterpages" and it
contains a master page named "Standard.master."

Also in my project, I created a directory called "Controls" which
contains a Web User Control named "Header.ascx" with a code behind of
"Header.ascx.cs".

I also have a file in the base directory named "default.aspx" with a
"default.aspx.cs" code behind page.

Pretty simple setup.

Now, in the Header control I've added an ASP Table control that
contains 1 row and 2 columns, 1 column is justified left, the other
right. Both columns have an ASP Image control within them. For
simplicty sake, I set the ImageURL on one image to
"images/header_left.jpg" and the ImageURL on the right image control to
"images/header_right.jpg" in the design view.

Now, I place this Header control on the Standard.master page (cause I
want it to show up on every page). I set the Header control to
EnableTheming to true in the properties.

I then associate the default.aspx to the Standard.master page. I set
the theme on the default.aspx page to "Standard" in the properties
pane.

When I run this project, the default.aspx can not find any of the
images and when I look at the source code it actually has a src on the
image of "controls/images/header_left.jpg" and
"controls/images/header_right.jpg" (not the path to the images).

What am I doing wrong that the images aren't being themed here?

I've even tried creating a propery so that I can se the ImageURLs from
the master page so that it might pass the correct path to control, but
that gives me the same results.

Am I missing something here?

Dec 14 '05 #2
I have tried using the root operator "~", but that didn't seem to
select the correct them, but change the src to
/website/controls/images/header_left.jpg. Which is still the incorrect
path.

I want to mention that I also added [Themable(true)] to the class (that
didn't help).

I also try to add the user control the Standard.skin file in the Theme
using:

<%@ register tagprefix="cc" namespace="Controls.Header"
assembly="__code" %>
<cc:header runat="server" skinid="standard" />

But it throws these errors:
Could not load file or assembly '__code' or one of its dependencies.
The system cannot find the file specified.
Unknown server tag 'cc:header'.

If I change the assembly variable to a legit assembly (the one that
contains the control), I get the same error listed above but __code now
says the assembly name.

Maybe I'm just not getting how theming works with user controls...

Dec 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: nicolasr | last post by:
Hi, I try to find out whether there is a reliable way to detect if an application is themed. Especially I need to know that from within my user control. From all the newsgroup posts I read I...
18
by: Egbert Nierop \(MVP for IIS\) | last post by:
When I build some add-ins for the management console using C++, the add-ins made by me show a Win2000 interface while the rest of the add-ins made by MS are using XP themes. What am I missing? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.