All you're doing is posting to a controller action, you haven't defined a success handler to determine what to do with the results of that call.
I take it that /PreviousController/PreviousAction/ works out what the last action called by the user was?
In which case, why not just make that part of your model when rendering your views?
public class SomeModel
{
public string LastAction {get; set;}
}
public ActionResult SomeAction()
{
var model = new SomeModel();
model.LastAction = GetPreviousAction();
return View(model);
}
Then in your Views, you can just render out links \ buttons
@model MyProject.SomeModel
<div class="my-view">
<a id="my-link" href="@Model.LastAction">Back</a>
<input type="button" name="backButton" id="backButton" value="Back" onclick="window.location.href='@Model.LastAction'">
</input></div>
Or, if you want to stick with what you've got, have your /PreviousController/PreviousAction/ return some JSON of the controller\action to navigate to. Your script could then look like
$("#BackButton").click(function () {
$.post("/PreviousController/PreviousAction/", function(data) {
window.location.href = data;
});
});
Personally, I'd make the 'LastAction' part of my model so I could just render out links \ buttons without requiring a AJAX call.