Im trying to redirect to a Controller from JavaScript using this line of code
location.href = '/Dashboard/';
It redirects to the Dashboard but on my dashboard view this method is called when the document loads
$.post("Dashboard/UsersGet", {}, function (dataSet) {
//do something with the dataset
});
I then get this error.
POST http://localhost:1414/Dashboard/Dashboard/UsersGet 404 (Not Found)
I can see that dashboard is added to the url twice. How can I redirect to a Controller without this happening?