473,385 Members | 1,641 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,385 software developers and data experts.

Asp.Net Themes and CSS. What a headache!

Hello,

For the past 4 days I have been articles and books to decide which
approach should I use regarding Asp.Net Themes and CSS.

One of my bigger problems can be described by the following:

Consider two different pages:

[Page 1]

Panel_1
Label_1
Panel_2
Label_2

[Page 2]

Panel_A
Label_A
Panel_B
Label_B

Now imagine that for each page I define a different layout with CSS
applied to the panels using "float" and "clear"

- Label_1 and Label_A have the same text style, <atag style and
<h1>style.

- Label_2 as the same <atag style and <h1>style as Label_1 and
Label_A but a different text style.

- Label_B as completly different text style, <atag style and
<h1>style.

Note: I take the Labels content from database and it can have Html
tags inserted by my client through a text box like FreeTextBox.

How should I set Themes and CSS files for this?

If I use pure CSS it will be easy but integrate this with Themes
just gives me a lot of redundant code in each page or headaches or
both! :-)

Could you please suggest me an approach for this example? It would be a
great help to decide which path to follow.

Thanks,

Miguel

Nov 26 '06 #1
1 1156
// Give the label a SkinId
<asp:Label SkinId="FreeTextBoxContent" .. />

// Write a default .skin file declaration
<asp:Label SkinId="FreeTextBoxContent" CssClass="defaultFreeTextBoxContent"
/>

// Define the CSS classes you need
..defaultFreeTextBoxContent { ... }
..option1FreeTextBoxContent { ... }

Now you can dynamically change the CssClass for the Skinned Label control
noting we can only get to the properties of a skinned control during the
PreInit event of the page.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h


"shapper" <md*****@gmail.comwrote in message
news:11**********************@j44g2000cwa.googlegr oups.com...
Hello,

For the past 4 days I have been articles and books to decide which
approach should I use regarding Asp.Net Themes and CSS.

One of my bigger problems can be described by the following:

Consider two different pages:

[Page 1]

Panel_1
Label_1
Panel_2
Label_2

[Page 2]

Panel_A
Label_A
Panel_B
Label_B

Now imagine that for each page I define a different layout with CSS
applied to the panels using "float" and "clear"

- Label_1 and Label_A have the same text style, <atag style and
<h1>style.

- Label_2 as the same <atag style and <h1>style as Label_1 and
Label_A but a different text style.

- Label_B as completly different text style, <atag style and
<h1>style.

Note: I take the Labels content from database and it can have Html
tags inserted by my client through a text box like FreeTextBox.

How should I set Themes and CSS files for this?

If I use pure CSS it will be easy but integrate this with Themes
just gives me a lot of redundant code in each page or headaches or
both! :-)

Could you please suggest me an approach for this example? It would be a
great help to decide which path to follow.

Thanks,

Miguel

Nov 27 '06 #2

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

Similar topics

0
by: Full Decent | last post by:
Hey again! In my quest to make proper use of OO PHP I would like to ask for a critique of the current method of doing themes in the Camera Life (http://fdcl.sf.net) software and see if an OO...
5
by: Jan Hyde | last post by:
I keep reading that there should be a couple of built in themes in the directory ...\Microsoft.NET\Framework\v2.x.xxxxx\ASP.NETClientFiles\Themes I've yet to see any machine with this 'Themes'...
3
by: johannblake | last post by:
I'm reading up on Themes and Master Pages in ASP.NET 2.0 but I cannot seem to understand what the difference between the two are. Do Master Pages essentially end up doing what Themes do? Is...
4
by: Sean | last post by:
My experience now working with master pages on and off for 6 months is that they can be very dangerous when working with themes. One example in particular is the changes I made to my banner menu...
6
by: Clinton Farleigh | last post by:
Hi, I was going to ask a question, but I think I've answered it so now I am going to rant about how crappy ASP.NET themes are instead. As I've indicated above, my problem today is with themes....
3
by: WT | last post by:
Hello, I need to list all available themes for a .NET app, is there any API in ..NET2 for this or should I explore the folder files using IO methods ? Thanks for indication CS
11
by: New Bee | last post by:
Hi, I have been looking at Themes and Skins today and now resonably understand how they work at a ground level. But I have a couple of questions. 1. ) StyleSheetTheme I dont understand...
2
by: mike | last post by:
Hi. I am having trouble grasping the concept of applying a consistent theme to an ASP.net website. I didn't used to like ASP because it was too hard to apply a theme from a common theme folder like...
1
by: Cramer | last post by:
Using 3.5: Suppose I have defined 20+ themes (including multiple graphics, ..skin files, and css files per theme), and I want to make those themes *available* to all the Web sites on my Web server....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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...

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.