views:

235

answers:

1

Hi, having this really silly problem in ASP.NET MVC 2 with .NET 4.

I need to test other pages using localhost, but sometimes I need to show the page to some else on another computer and so need to path out to my machine. In doing so, I need to use relative paths for my and tags. When I test through VS, I use relative path:

<script src="../../Scripts/somejavascript.js"></script>
<link href="../../Styles/somestyle.css" />

However, when I publish to local IIS, I'm having all sorts of problems beacuse the Scripts and Styles folder are at the same directory level, but it seems like I have to path out differently. For example, in the scenario above the styles will be picked up but the JavaScript won't be.

Any ideas on how best to path out, relatively using MVC 2?

A: 

Look at answer for this question http://stackoverflow.com/questions/371591/jquery-in-an-asp-net-mvc-application-using-master-pages#371603

er-v
that works. Thanks much! That answer isn't tagged well and so I couldn't find it. Perhaps this one is tagged better. Thanks all the same.
Tomaszewski