MVC Partial view Inside partial view with Timer

1

I have a partial view which is rendered like this in my main view by calling the function.

function LoadPartialView1(){  url = ROOT + "ControllerName/PartialView1_PV?Dashboard=" + Dashboard + "&department=" + department;
        $.get(url, function (data) {
            $('#divPartial').html(data);
        });  }

In this partial view let us imagine I am getting list of Employees in a particular department. Against each employee I need to append the work details of today,So in this PartialView1_PV I am calling another partial view like this

 <div>
  @Html.Action("WorkDetails", "ControllerName", new { EmployeeId= item.EmployeeId})
  </div>

Here I am able to get the details and display it ,but I have a timer running and it is calling the LoadPartialView1() function in each 10 seconds.In my localhost it is running fine and getting refreshed ,but when I published it in the server Iam getting error saying

System.Web.HttpException (0x80004005): Cannot redirect after HTTP headers have been sent.

I have referred to other questions like Stackoverflow qustion1, StackOverflow question2 but still no go. Any help is appreciated.

c#
jquery
asp.net-mvc
razor
model-view-controller
asked on Stack Overflow Oct 9, 2018 by Sribin • edited Oct 9, 2018 by Stephen Muecke

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0