AngularJs and ASP.NET getting internal server 500 error while updating record

26 Views Asked by At

From a list of records edit button is added, when clicked edit page is loaded, button code is:

<button type="button" class="btn btn-primary"  
        ng-click="GoToUpdateTask(item.Task_Id)">Update</button>

Edit page url and code is like this:

<div class="container-fluid" ng-controller="hadafController" 
     ng-init="GetTaskByID('@ViewBag.task_id')">

http://localhost:16717/NewApp/TaskDetail?task_id=1

This is the code for update:

  <button class="btn btn-primary btn-sm mb-2" ng-click="UpdateTask(TaskDetail.Task_Id)"><i class="mdi mdi-view-grid-plus"></i> Update Task</button>

When update button is clicked the record is saved successfully in database, however I get the following exception and url is also changed:

enter image description here

I am new to AngularJs , please guide me - what is missing?

0

There are 0 best solutions below