--- calling this method on a button click 
$scope.Name=srinu
$scope.dyanmictab = function () {
            console.log($scope.director);
            $http({
                method: "POST",
                url: 
"http://localhost:64397/Api/student/GetStudentsdynamic";,
                dataType: 'json',
                data: { name: $scope.Name },
                headers: { "Content-Type": "application/json" }

            });


-------------- in Controller 

   [Route("GetStudentsdynamic")]
        [HttpPost]
        public string GetStudentsdynamic([FromBody] string  name)
        {
             
            catch (Exception e)
            {
                name= null;
            }
            return name;
        }

getting name as null from controller side 

Please suggest me the correct code 

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/3872cd2c-8f2f-482d-82b7-5460ce7441f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to