Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey Guys!
i have developed an asp.net mvc project in which the footer css i have use in my main Layout.cshtml like:
<link href="../stylesheet/footer.css" rel="stylesheet" type="text/css" />
when i deploy the project locally i works fine. but when i publish the project on hosting server or local server, it gives error. that above css file can't be rendered. when i remove "../" form my above link. then it works fine. i dont know whats the reason. Any idea whats wrong?
Thanks
Posted

The issue is relative path referencing issue. Staring with ../ resolved peer of the current page path. So when you deploy it to hosting server then its peer of the current page path is difference then your local environment. If you read link then you can easily understand the issue.
 
Share this answer
 
Take that .. and replace it ~ tilde symbol.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900