Description
Hi,
I have "get" method in my controller which features a multi select list box that takes multiple selections from a user. I have a similar "post" method that returns the results of these selections. At the moment however, the "post" method is only returning the results from one selection when more than one value as been selected. In this instance, more than one value's results should be returned. Would someone mind taking a look at my "post" method to see what is going wrong? Thankyou.
Price is negotiable.
[HttpPost]
public ActionResult Find(FindViewModel viewModel)
{
viewModel.PersonViewModel = new PersonViewModel
{
Organisations =
new MultiSelectList(
this.personManager
.GetAllPeople(),
"Id",
"Name"),
};
if (!this.ModelState.IsValid)
{
return this.View(viewModel);
}
viewModel.SearchResult = this.petManager.FindPets(viewModel.SearchCriteria, int.Parse(Session["LoginId"].ToString()));
return this.View(viewModel);
}
I am looking for a reasonable answer, no essays, and high English proficiency preferred.
Explanation & Answer
Review
Review
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Similar Content
Related Tags
Uncle Tom's Cabin
by Harriet Beecher Stowe
Mrs Dalloway
by Virginia Woolf
The Elegant Universe
by Brian Greene
Anthem
by Ayn Rand
Communist Manifesto
by Karl Marx
Homo Deus
by Yuval Noah Harari
Pachinko
by Min Jin Lee
A Portrait of the Artist as a Young Man
by James Joyce
The Prince
by Niccolò Machiavelli