Bogdan Verbenets
Bogdan Verbenets

Reputation: 26936

configure routing of POST parameters

Do the POST parameters need some sort of routing configuration in ASP.NET MVC? If I write a method in my controller: DoSomething(bool DoItRightNow) and then pass in the POST parameters the DoItRightNow value, then will it work? Also, in what format the POST parameters should be for MVC to understand them? Is JSON going to be understood by MVC?

Upvotes: 1

Views: 818

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038720

Do the POST parameters need some sort of routing configuration in ASP.NET MVC?

No.

If I write a method in my controller: DoSomething(bool DoItRightNow) and then pass in the POST parameters the DoItRightNow value, then will it work?

Yes.

Also, in what format the POST parameters should be for MVC to understand them?

application/x-www-form-urlencoded or multipart/form-data

Is JSON going to be understood by MVC?

Out of the box in ASP.NET MVC 3 and a bit of a coding in previous versions.

Upvotes: 2

Related Questions