I've got a master page, with stylesheets on it defined as such:
<link href="/css/reset-min.css" rel="stylesheet" media="all" />
problem is, I have pages in different folders that link to that master page,
so any page that's not in the same folder as the master page, don't display
the css. I've tried the following:
<link href="~/css/reset-min.css" rel="stylesheet" media="all" />
which didn't work.
This did work
<link href="<%= ResolveUrl("~/css/reset-min.css") %>" rel="stylesheet"
media="all" />
But the styles don't show up in design.
Hints/tips greatly appreciated.
Thanks
Bryce 6 1612
On Sep 27, 8:48 am, "Giganews" <br...@berzerker-soft.comwrote:
I've got a master page, with stylesheets on it defined as such:
<link href="/css/reset-min.css" rel="stylesheet" media="all" />
problem is, I have pages in different folders that link to that master page,
so any page that's not in the same folder as the master page, don't display
the css. I've tried the following:
<link href="~/css/reset-min.css" rel="stylesheet" media="all" />
which didn't work.
This did work
<link href="<%= ResolveUrl("~/css/reset-min.css") %>" rel="stylesheet"
media="all" />
But the styles don't show up in design.
Hints/tips greatly appreciated.
Thanks
Bryce
Hi Bryce
Try this:
<link runat="server" href="~/css/reset-min.css" rel="stylesheet"
media="all" />
The tilde won't resolve to your application root unless it's a server-
side control.
Chris
This is an issue that is discussed at length in the forums at asp.net.
"Giganews" <br***@berzerker-soft.comwrote in message
news:iO******************************@giganews.com ...
I've got a master page, with stylesheets on it defined as such:
<link href="/css/reset-min.css" rel="stylesheet" media="all" />
problem is, I have pages in different folders that link to that master
page, so any page that's not in the same folder as the master page, don't
display the css. I've tried the following:
<link href="~/css/reset-min.css" rel="stylesheet" media="all" />
which didn't work.
This did work
<link href="<%= ResolveUrl("~/css/reset-min.css") %>" rel="stylesheet"
media="all" />
But the styles don't show up in design.
Hints/tips greatly appreciated.
Thanks
Bryce
I bet you are not telling us the truth..... :)
You probably refer to reset-min.css without first slash. Like
<link href="css/reset-min.css" rel="stylesheet" media="all" />
This is called relative path and it refers to the path relative you current
page location.
so for "http://www.myserver.com/folder1/page1.asp" css/reset-min.css will
refer to file "http://www.myserver.com/folder1/css/reset-min.css"
Just make sure you have it as you wrote it here... with first slash like
<link href="/css/reset-min.css" rel="stylesheet" media="all" />
then it's going to be absolute path and refer to http://www.myserver.com/css/reset-min.css
George
"Giganews" <br***@berzerker-soft.comwrote in message
news:iO******************************@giganews.com ...
I've got a master page, with stylesheets on it defined as such:
<link href="/css/reset-min.css" rel="stylesheet" media="all" />
problem is, I have pages in different folders that link to that master
page, so any page that's not in the same folder as the master page, don't
display the css. I've tried the following:
<link href="~/css/reset-min.css" rel="stylesheet" media="all" />
which didn't work.
This did work
<link href="<%= ResolveUrl("~/css/reset-min.css") %>" rel="stylesheet"
media="all" />
But the styles don't show up in design.
Hints/tips greatly appreciated.
Thanks
Bryce
Chris Fulstow wrote:
On Sep 27, 8:48 am, "Giganews" <br...@berzerker-soft.comwrote:
>I've got a master page, with stylesheets on it defined as such: <link href="/css/reset-min.css" rel="stylesheet" media="all" />
problem is, I have pages in different folders that link to that master page, so any page that's not in the same folder as the master page, don't display the css. I've tried the following:
<link href="~/css/reset-min.css" rel="stylesheet" media="all" />
which didn't work.
This did work <link href="<%= ResolveUrl("~/css/reset-min.css") %>" rel="stylesheet" media="all" /> But the styles don't show up in design.
Hints/tips greatly appreciated.
Thanks
Bryce
Hi Bryce
Try this:
<link runat="server" href="~/css/reset-min.css" rel="stylesheet"
media="all" />
The tilde won't resolve to your application root unless it's a server-
side control.
Thanks. that worked like a charm. Should have thought to do the
runat="server" bit...
clintonG wrote:
This is an issue that is discussed at length in the forums at asp.net.
Thanks. I'd visited asp.net before, but not the forums. I'll be checking
that out from now on. Thanks
"Giganews" <br***@berzerker-soft.comwrote in message
news:iO******************************@giganews.com ...
>I've got a master page, with stylesheets on it defined as such: <link href="/css/reset-min.css" rel="stylesheet" media="all" />
problem is, I have pages in different folders that link to that master page, so any page that's not in the same folder as the master page, don't display the css. I've tried the following:
<link href="~/css/reset-min.css" rel="stylesheet" media="all" />
which didn't work.
This did work <link href="<%= ResolveUrl("~/css/reset-min.css") %>" rel="stylesheet" media="all" /> But the styles don't show up in design.
Hints/tips greatly appreciated. Thanks
Bryce
George Ter-Saakov wrote:
I bet you are not telling us the truth..... :)
You probably refer to reset-min.css without first slash. Like
<link href="css/reset-min.css" rel="stylesheet" media="all" />
That's entirely possible. I thought I had tried it with the slash in
front, but might have been incorrect.
This is called relative path and it refers to the path relative you current
page location.
so for "http://www.myserver.com/folder1/page1.asp" css/reset-min.css will
refer to file "http://www.myserver.com/folder1/css/reset-min.css"
Just make sure you have it as you wrote it here... with first slash like
<link href="/css/reset-min.css" rel="stylesheet" media="all" />
then it's going to be absolute path and refer to http://www.myserver.com/css/reset-min.css
George
"Giganews" <br***@berzerker-soft.comwrote in message
news:iO******************************@giganews.com ...
>I've got a master page, with stylesheets on it defined as such: <link href="/css/reset-min.css" rel="stylesheet" media="all" />
problem is, I have pages in different folders that link to that master page, so any page that's not in the same folder as the master page, don't display the css. I've tried the following:
<link href="~/css/reset-min.css" rel="stylesheet" media="all" />
which didn't work.
This did work <link href="<%= ResolveUrl("~/css/reset-min.css") %>" rel="stylesheet" media="all" /> But the styles don't show up in design.
Hints/tips greatly appreciated. Thanks
Bryce This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Simon Brunning |
last post by:
QOTW: "The posts do share an erroneous, implied assumption that the
investment in learning each language is equal. Python has a strong
competitive advantage over Java and C++ in terms of...
|
by: Michael Herman \(Parallelspace\) |
last post by:
1. What are some compelling solutions for using Master/Content pages with
Web Pages?
2. If a content area has a web part zone with web parts, what is the user
experience like when "editting" the...
|
by: Steve Franks |
last post by:
I am familiar with the fact that you have to use runat=server and links
staring with "~/" to ensure proper mapping of paths to relative URLs when
using master pages. However this does not seem to...
|
by: Brett Baisley |
last post by:
Hello,
I am having trouble figuring out URL's from my master page.
Here is my setup. I have a default.aspx and default.master file in the root
folder. I have an "images" folder with logos and...
|
by: Learner |
last post by:
Hello,
we are using Master Pages in asp.net 2.0. Our Master page has three
contentplaceholders. On the left most ContentPlaceHolder we have all
the links for the navigation of the site. One of the...
|
by: Samuel Shulman |
last post by:
Since the master page is used in pages located in many folders how can I add
relative links to the master page?
Thank you,
Samuel
|
by: Paul Boddie |
last post by:
QOTW: "Given these criteria, my recommendations for a first programming
language would be Python or Scheme." - Peter Norvig (some time ago, but
referenced on comp.lang.lisp this week)...
|
by: Rich |
last post by:
Hi,
I want to use 2 master pages, one for the main part of the site, the other
for the admin pages.
They are quite similar, with many shared elements.
Ideally I would like to have a parent...
|
by: Cameron Laird |
last post by:
QOTW: "I have a fake supervisor reference generator for job interviews, a
fake house inspection generator for real estate transactions, and a fake
parole testimony generator - maybe you could...
|
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...
|
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...
|
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...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |