By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,396 Members | 1,882 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,396 IT Pros & Developers. It's quick & easy.

CSS problem

P: 37
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
Share this Question
Share on Google+
3 Replies


Markus
Expert 5K+
P: 6,050
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

P: 37
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 5K+
P: 7,435
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.