using ajax.beginform not rendering view

473 views Asked by At

I have a partial view that has an Ajax.BeginForm, it renders after clicking on a link, it was working before but I changed it and now its not working, this is what it looks like now:

@using (Ajax.BeginForm(
    "AddTimeSeriesData",
    "Employees1Controller",
    new routevalues { },
    new AjaxOptions { UpdateTargetId = domElementId, InsertionMode = InsertionMode.ReplaceWith }, 
    new { id = "ajax_form" }
    )
    )
{

is my declaration wrong? Isn't this a valid overload?

when I had the following it worked:

@using (Ajax.BeginForm(
    new AjaxOptions { UpdateTargetId = domElementId, InsertionMode = InsertionMode.ReplaceWith }
    )
    )
{
1

There are 1 answers

0
Deep On

AddTimeSeriesData should be your Action Method on your controller Employees1Controller.

Make sure your contoller name correct, I guess it should be Employees1 and not Employees1Controller.

Since you are doing nothing on parameter three (new routevalues) remove it.

Hope fully it will work for you.