I am working in mvc project. I am using javascript modules in js files to perform some operations.
I am creating and using links in js files. For example accessing an image file.
var selectIcon = function() {
return "/Images/ui/ShapefileLine16.png";
}
and I want to send request to an action method in Product controller like this.
this.getProducts = function () {
$.get('Product/GetProjducts', { }, this.products);
}
This codes are working on development time, visual studio IIS express.
But when I publish the project on IIS virtual directory under Default Web Site, the functions are not working. image and controller action resources can not found.
How can I access resources relatively? (@Url.ActionLink is working in MVC but I can not use it)