How do you repopulate a form in ASP.NET MVC that contains a DropDownList?

I believe you are asking how to maintain the value for a dropdown list after a form is submitted and re-displayed. If so, please see below for a VERY SIMPLE example.

I just wanted to add the BigJoe714 has it right except the ...new SelectList(listItems, "Value", "Key", selectedItem) has the key / value switched.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions