473,473 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

style sheets

I have a style sheet file that I would like all .aspx pages to use by
default. Is there a way to set this globally? If so, how?

Thanks.

Nov 18 '05 #1
5 1530
The two ways people would mention the most would be to use either a common
base page in all your pages, or to use master pages.

My personal opinion is that for this type of presentation layer stuff, go
with master pages (which you'll find useful a bunch of other ways as well)

http://www.metabuilders.com/Tools/MasterPages.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"No One" <no***@yahoo.com> wrote in message
news:41***************@yahoo.com...
I have a style sheet file that I would like all .aspx pages to use by
default. Is there a way to set this globally? If so, how?

Thanks.

Nov 18 '05 #2
Hi karl,
I just drop by, and have a question about it. I don't know how to use
masterpages in VS .Net 2003 to development my page, as it seems not
supporting.. I had tried b4 but fail to use it, is there anything to
install or it is only available to new version VS.??

Thx.
Rena.

"Karl" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> ¦b¶l¥ó
news:OV**************@TK2MSFTNGP15.phx.gbl ¤¤¼¶¼g...
The two ways people would mention the most would be to use either a common
base page in all your pages, or to use master pages.

My personal opinion is that for this type of presentation layer stuff, go
with master pages (which you'll find useful a bunch of other ways as well)

http://www.metabuilders.com/Tools/MasterPages.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"No One" <no***@yahoo.com> wrote in message
news:41***************@yahoo.com...
I have a style sheet file that I would like all .aspx pages to use by
default. Is there a way to set this globally? If so, how?

Thanks.


Nov 18 '05 #3
Rena,
They aren't built-into .Net 1.1, but will be in 2.0. For the time being you
can use (free) 3rd party controls which work really well, the link again is:

http://www.metabuilders.com/Tools/MasterPages.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Rena" <Re**@mail.hongkong.com> wrote in message
news:eT**************@TK2MSFTNGP10.phx.gbl...
Hi karl,
I just drop by, and have a question about it. I don't know how to use
masterpages in VS .Net 2003 to development my page, as it seems not
supporting.. I had tried b4 but fail to use it, is there anything to
install or it is only available to new version VS.??

Thx.
Rena.

"Karl" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> ¦b¶l¥ó
news:OV**************@TK2MSFTNGP15.phx.gbl ¤¤¼¶¼g...
The two ways people would mention the most would be to use either a common base page in all your pages, or to use master pages.

My personal opinion is that for this type of presentation layer stuff, go with master pages (which you'll find useful a bunch of other ways as well)
http://www.metabuilders.com/Tools/MasterPages.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"No One" <no***@yahoo.com> wrote in message
news:41***************@yahoo.com...
I have a style sheet file that I would like all .aspx pages to use by
default. Is there a way to set this globally? If so, how?

Thanks.



Nov 18 '05 #4
I am not sure I understand the common base option. If I create a webform with
C# code behind and set the still sheet in the HTML, how is this enherited to a
new form?

Karl wrote:
The two ways people would mention the most would be to use either a common
base page in all your pages, or to use master pages.

My personal opinion is that for this type of presentation layer stuff, go
with master pages (which you'll find useful a bunch of other ways as well)

http://www.metabuilders.com/Tools/MasterPages.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/

"No One" <no***@yahoo.com> wrote in message
news:41***************@yahoo.com...
I have a style sheet file that I would like all .aspx pages to use by
default. Is there a way to set this globally? If so, how?

Thanks.


Nov 18 '05 #5
You create a class:

class MyBasePage : System.Web.UI.Page{

public override Render(HtmlTextWriter writer){
writer.Write("<link....");
base.Render(writer)
}

}

and you make your webforms inherit from that instead of directly from Page

Class WebForm1 : MyBasePage{
//everything else the same
}
the code for the base class isn't 100%...I don't have VS open so
HtmlTextWriter might be wrong and how to use it might be wrong..but should
give you enough to go by ...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"No One" <no***@yahoo.com> wrote in message
news:41***************@yahoo.com...
I am not sure I understand the common base option. If I create a webform with C# code behind and set the still sheet in the HTML, how is this enherited to a new form?

Karl wrote:
The two ways people would mention the most would be to use either a common base page in all your pages, or to use master pages.

My personal opinion is that for this type of presentation layer stuff, go with master pages (which you'll find useful a bunch of other ways as well)
http://www.metabuilders.com/Tools/MasterPages.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/

"No One" <no***@yahoo.com> wrote in message
news:41***************@yahoo.com...
I have a style sheet file that I would like all .aspx pages to use by
default. Is there a way to set this globally? If so, how?

Thanks.

Nov 18 '05 #6

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

Similar topics

16
by: Geoff Cox | last post by:
Hello, I publish some web pages using large fonts and would like to give the user the opportunity to print the pages using a smaller font. I believe that this is possible using different style...
2
by: Luke Bellamy | last post by:
Hi, I have been looking for a way to incorperate several different style sheets into a web page (i.e cascading effect). I have looked into the @import statement which seems to do what I want but...
3
by: Phil Thompson | last post by:
does it matter in which order i place different style sheets i.e. <link rel="stylesheet" type="text/css" media="screen" href="style/screen.css" /> <link rel="stylesheet" type="text/css"...
12
by: relaxedrob | last post by:
Hi All! I have a page with with the following style information: <link rel="stylesheet" type="text/css" href="/eEmployment/eTech.css" /> <style type="text/css"> DIV.Application {...
9
by: lkrubner | last post by:
How do I get all the div's on a page? I realize in IE I can use document.all. For the other browsers, I need to get an array of all the divs on the page. getElementByTagName()?????
12
by: Jarno Suni | last post by:
I want a device to use styles given for media type handheld and not the styles given for media type screen, if the device supports media types handheld and screen. Is it possible without writing...
9
by: Radium | last post by:
Cascading Style Sheet is an extreme hazard to your privacy. It allows others on the internet to see your monitor and files. It allows them to copy images on your monitor to their computers. It...
2
by: Hallvard B Furuseth | last post by:
Are there any guidelines or conventions for how to organize the preferred and alternate style sheets for a site, sheets for different media, and what titles to give them in the <link...
1
by: mscertified | last post by:
Can anyone explain how references to style sheets work, I've exhausted looking in help, its all so confusing. I have three style sheets in my project under 'Style Sheets'. Only the first style...
5
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a machine running IIS 6.0. I just replaced the web.config and several aspx pages in the application and now the style sheets are not working. the images from the themes work but not the css...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.