I would like to switch some of my code from WebForms(aspx) & WebServices(asmx) to MVC. Is there a way to get a MVC ActionResult using Ajax.
For an example I download Chris Hammond's MessageOfTheDay example (see Link below). From this modual shouldn't I be able to call
$(document).ready(function () {
$.ajax({
cache: false,
url: 'Christoc.Modules.MessageOfTheDay.Controllers/Message/Index.mvc',
dataType: 'html',
success: function (data) {
$('#PlaceHolder').empty();
$('#PlaceHolder').html(data);
});
},
error: function (err) {
console.log(err);
}
});
});
https://github.com/ChrisHammond/MessageOfTheDay
or
http://chrishammond.github.io/MessageOfTheDay/