467,910 Members | 1,604 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,910 developers. It's quick & easy.

CSS problem

Hi,

I have ASP.NET 2.0 website. I have 3 files. style.css, master.page and page1.aspx. I load the css from the master.page. If my URL is like this:

http://www.mywebsite.com/new_web/page1.aspx

the CSS is loaded and everything is OK. But when I try this URL everything becomes a mess because the CSS could not be found.

http://www.mywebsite.com/new_web//page1.aspx
note: ( double ' / ' )

Can some1 tell me where is the problem and how can I avoid this without parsing the URL and replacing ' // ' with ' / ' because this is not a good solution.
Feb 27 '08 #1
  • viewed: 790
Share:
3 Replies
Markus
Expert 4TB
Hi,

I have ASP.NET 2.0 website. I have 3 files. style.css, master.page and page1.aspx. I load the css from the master.page. If my URL is like this:

http://www.mywebsite.com/new_web/page1.aspx

the CSS is loaded and everything is OK. But when I try this URL everything becomes a mess because the CSS could not be found.

http://www.mywebsite.com/new_web//page1.aspx
note: ( double ' / ' )

Can some1 tell me where is the problem and how can I avoid this without parsing the URL and replacing ' // ' with ' / ' because this is not a good solution.
Why would you have double forward slashes in the first place?
Feb 27 '08 #2
The question is not why I enter double ' // '. I have to solve this. If I try to do this with some page of microsoft website it is OK.
Feb 27 '08 #3
drhowarddrfine
Expert 4TB
Using the double slash will never work because that's the path name to the file, just like on your computer. So forget about it. It won't work no matter what you do. That's not how the protocol works.
Feb 27 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

11 posts views Thread by Kostatus | last post: by
117 posts views Thread by Peter Olcott | last post: by
18 posts views Thread by Ian Stanley | last post: by
28 posts views Thread by Jon Davis | last post: by
6 posts views Thread by Ammar | last post: by
2 posts views Thread by Mike Collins | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.