In my MVC5 Project, I have used Jquery and to use Controller Actions, I used relative path. Here is a sample:-
$("#divTree").jstree({
'core': {
'data': {
"url": "/Customer/GetList",
"dataType": "json"
},
"check_callback": true
},
"plugins": ["contextmenu", "dnd", "json_data"]
});
I am also using relative paths in jquery.ajax() method. All relative paths are working in visual studio. But when I publish and host it in IIS, relative paths are not working.
In my asp.net web forms projects I am either using ReloveUrl() or ~.
How should i handle it in MVC 5 project.?