Where is asp.net mvc3 controller parameter coming from?

leo8978

New Member
I am relatively new to MVC3 and had a question about a parameter in a controller.I have a controller that takes an id\[code\]public ActionResult ChooseItem(string id) ...\[/code\]This controller's view creates a form, and when the user submits the form it posts to this controller\[code\][HttpPost] public ActionResult ChooseApp(string id, string itemID)...\[/code\]The strange thing is, even though I do not have a hidden variable that stores \[code\]id\[/code\] in the view that is POSTing to this control, the id parameter is set correctly. This is actually a good thing, but I don't understand where the value is coming from. I have examined the POST values in Chrome dev tools and there is not an id in the form values that are POSTed. What is setting the id value correctly?
 
Back
Top