473,406 Members | 2,698 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.

Master pages with diff style sheets

Hi ,

I puzzled on how to layout my website. I have a master page with a style
sheet defined in the top. Then I have the various pages using this master
page, I would however for cetain pages either add or use a different style
sheet , whats the best wayto achive this.

Thanks

Neil
Oct 5 '06 #1
2 1310
Maybe try something like this:

HtmlLink myHtmlLink = new HtmlLink();
myHtmlLink.Href = "~/StyleSheet.css";
myHtmlLink.Attributes.Add("rel", "stylesheet");
myHtmlLink.Attributes.Add("type", "text/css");
Page.Header.Controls.Add(myHtmlLink);

Neil Steventon wrote:
Hi ,

I puzzled on how to layout my website. I have a master page with a style
sheet defined in the top. Then I have the various pages using this master
page, I would however for cetain pages either add or use a different style
sheet , whats the best wayto achive this.

Thanks

Neil
Oct 5 '06 #2
Yep that sounds like it will work. Thanks for response.

Neil

"Chris Fulstow" wrote:
Maybe try something like this:

HtmlLink myHtmlLink = new HtmlLink();
myHtmlLink.Href = "~/StyleSheet.css";
myHtmlLink.Attributes.Add("rel", "stylesheet");
myHtmlLink.Attributes.Add("type", "text/css");
Page.Header.Controls.Add(myHtmlLink);

Neil Steventon wrote:
Hi ,

I puzzled on how to layout my website. I have a master page with a style
sheet defined in the top. Then I have the various pages using this master
page, I would however for cetain pages either add or use a different style
sheet , whats the best wayto achive this.

Thanks

Neil

Oct 5 '06 #3

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

Similar topics

3
by: Paul | last post by:
I found a great site for CSS tempaltes, http://blog.html.it/layoutgala/ . I downloaded them, and played around with them. Then I tried to use the template in as ASP.Net MasterPage, but everything...
0
by: Glenn | last post by:
Hi Can I use external style sheets with Master/content pages in ASP.NET 2 .. As thc ontent page can't define a head tag does this mean i can't define an external style sheet?
7
by: Rolf Welskes | last post by:
Hello, Master-Content in asp.net is very powerful. But: I have the following: One Master-Form. 30 Content-Forms which are the webpages used. Each of this content-forms must have own...
8
by: JT | last post by:
Hi, I have done a fair amount of style editing inline in ASP. I'm now using VS 2005 with a standard web project (not Web Application Project). This is my first foray into CSS in a style sheet...
6
by: Just Me | last post by:
When using master pages, how can I get an external style sheet applied to the specific page and still see the effects at design time. I want to have a generic style sheet and specific ones for each...
7
by: Just Me | last post by:
Hi I have a master page with a control on it, but I need to set a property of that control from the content. my master page is called Admin.Master and the class is Admin. I have tried this
11
by: Just Me | last post by:
I can see master pages being useful if one wants some fragil or complex web design which one does not want to have altered, but thats were it stops as far as I can see. Master Pages Plus 1.)...
1
by: Kat | last post by:
I have a master page, with a reference to a style sheet in the header, as usual: <link href="Styles.css" type="text/css" rel="stylesheet" /> I have a content page, with a label on it: ...
6
by: Homer J. Simpson | last post by:
Hi all, I have enough experience with HTML/classic ASP to get by, and I'm trying to learn ASP.NET. Traditionally, I've taken the habit of breaking out extra-long CSS files into multiple,...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.