MVC Javascript error
I configured my default page to say "abcd.aspx" and is under ~ / View // abcd.aspx and I have my javascripts under ~ / Contents / Scripts / .js
For some reason, only "../Content/Scripts/.js" works to include the js file in the page, while "~ / Contents / Scripts / .js" does not. This only works when accessing the page with the full url: http: // // controller / action. And since this is also the default page - accessing it through the default page tries to load scripts and the images will be broken, since the "../" relative path means it will look under http: // server / Contents / Scripts . ..
I thought using "~ /" for the relative path should fix the situation, but as I mentioned, it doesn't work for the full url, nor for the default home page.
Please let me know how I should link to paths here.
Any help would be much appreciated.
Thank!