I have a view inside my Views folder in my MVC 3 application which loads CSS, Images and JS files from a folder at root level of the application. On running the View get the following output, I tried using
<link href="@Url.Content("~/RootFolder/styles.css")" rel="stylesheet" type="text/css" />
for CSS and below code which did not work<script src="@Url.Content("~/RootFolder/jquery-1.8.3.min.js")" type="text/javascript"></script>
- I added in my views Web.config file
I cannot load CSS/Images/JS files from the root folder, But if I place the cshtml file in the root folder where CSS/Images/JS files are present the application works as expected displaying everything. Can you please help me resolve this issue
Thanks for your help :-)
UPDATE: My HTML code looks as shown in the below image
My folder hierarchy in the application looks as