Coming from a webform background using ajax I am trying to create similar with mvc.
I have worked out what the controller, view and models do.
What i would like to do now is that when my user clicks a button an jquery call is made to update the view - hence not refreshing the entire page.
Much like a master/child design in webforms.
I have googled and I have tried a couple of things but I get a 404. I have checked and i am sure I am calling things correctly.
This is my jquery function:
$("#divProductsBanner").click(function () {
var currentObject = $(this).text();
$.get('@Url.Action("Lite", "Service")', { theName: currentObject });
});
Where 'Lite' is my view and 'Service' is my controller.
my Service.cs controller looks like this:
public ActionResult Lite()
{
return View();
}
and I have a view called 'Lite' under my 'Service' folder under the 'Views' folder.
when I click that button i get this error: