I have a hidden input field that contains the value that I need to send to my mvc controller.
$http({ method: 'GET', url: '/User/GetProjectsList' })
.success(function (data, status, headers, config) {
$scope.workflow = [];
$scope.Projects = data;
})
.error(function (data, status, headers, config) {
alert('error');
});
And the hidden field:
<input type="hidden" ng-model='ProjectId' value="{{ProjectsObj.IDWorkflow}}"></input>
How can I send a value to my controller and how to get it in the controller? This is the method that I used for the MVC controller.
[HttpPost]
public JsonResult GetProjectsList()
{
return Json();
}
source
share