Saturday, 15 August 2015

c# - POST request doesn't work with ASP.Net -



c# - POST request doesn't work with ASP.Net -

i'm trying post request on page called expression.cshtml angularjs:

$http.post('templates/expression.cshtml', { data: $scope.elements[key]['expression'] });

it works can see :

the problem can't "data" parameter on expression.cshtml , have tried many things such as

@{ dynamic look = ""; foreach (string name in request.form) { expression+=name; } } @expression

or

@{ dynamic look = ""; string look = request.form["data"] } @expression

and lot of other things, problem i've empty answer...

you cannot post page, can post action method in controller. actually, posting view, makes less sense :)

asp.net mvc - using post, redirect, pattern

you should start asp.net tutorials like: http://www.asp.net/mvc/tutorials/mvc-5/introduction/getting-started understand how asp.net mvc works.

c# asp.net angularjs

No comments:

Post a Comment