0

I am creating one Json array object and trying to pass it in MVC controller action method but i am getting null paramerter; as per my knowledge json only maps .net primitive datatypes.... so it assign null value.

Note: when i have look at request object i found that there are three parameter of created array. But how to get that value as parameter of function?

0

2 Answers 2

0

You need to create a custom model binder which will take the json value and construct a model object which can be passed into your action.

Another option is to use a different value binder. See Phil Haack's site for an example.

Sign up to request clarification or add additional context in comments.

1 Comment

same issue i am facing. did you succeeded ? please guide me. what you have done for this ?
0

If you don't like to create custom model class for each time you call an action, then you can use my solution here

Pass JSON Object To MVC Controller as an Argument

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.