0

Is there any order or pattern that action parameters in an MVC controller follow. For example:

[HttpPost]
public ActionResult AddFiles(HttpPostedFileBase file, int catid, string description)

How does the controller know that this certain post parameter is for catid and so on.

1
  • When you call "ASP.NET MVC" framework just "the MVC", it is like referring to IE as "the internet". Commented Jun 13, 2012 at 11:11

1 Answer 1

1

The default model binder when trying to bind the catid parameter looks for a value with that name. It looks in the form values, route data, query string and http file collection. Take a look at this.

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

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.