5

Below is a screenshot of the POST request (using Firebug Net panel) I am sending to my ASP.NET MVC2 controller.

post request snapshot

This is the controller / action method that receives the POST request:

public ActionResult Search(int[] skill, int[] discipline, int[] education, int[] marketsector){ ... }

The parameters POSTed seem to me to be in the correct form, however the action method receives four null arguments. Could you please tell me what should the method signature look like on the server side? Or a better way of posting these four integer arrays to my MVC2 controller?

1 Answer 1

6

They could look like this:

<input type="text" name="discipline" value="6" />
<input type="text" name="marketsector" value="5" />
<input type="text" name="marketsector" value="7" />
<input type="text" name="marketsector" value="3" />
<input type="text" name="skill" value="3" />
<input type="text" name="skill" value="8" />

And here's a blog post you may take a look at. And a similar one.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.