Hi All
I have a view that contains 2 list boxes: Audience & Locale
I'm trying to submit a form that contains the selected index of both to my controller, which has an action method of this signature:
public JsonResult Submit(Audience aud, Locale loc)
{
// do stuff
}
The problem I'm having is both Audience & Locale have an ID property, so the Model Binder is a little bit confused over which to assign the selected values to. Both get assigned the value '1', when Audience should have '2' and Locale should have '1'
The question is how can I get the page to differentiate between the two when it's submitting? We've tried prepending the ID value for Locale with "locale.", so the parameter string that gets passed as data to the Controller looks like
"&locale.id=1&audience.id=2"
but that doesn't seem to work.
Any suggestions? If more info is needed, I'll supply it.
Thanks
Dave