Here is my method:
function logOff() {
$.ajax({ url: "Login/LogOff", type: "GET", success: function (data) { window.location.href = "Login/Index"; } })//end of ajax call
}
With this, I want the action method LogOff in the LoginController to be called. However, what is called is: http://localhost:6355/Home/Login/LogOff and I get error. Why is this happening?
Here is what I did: