Posted on: 6/28/2013 7:15:30 PM | Views : 757

I have 2 small problems.  I am adding a value to the listbox but everytime I add another value it replaces the last value. I want to have multiply values.  and 2 when I rebind the listbox when adding it does not hold the last values. I have to put something in the http post or I will get a null error.  
VIEW //############################# view ############### @Html.TextBoxFor(mod => mod.ItemToAdd, new { Style = "height:20px; " }) <div align="center"><input type="submit" name="addS" id="addS" value="Add" /></div> @Html.ListBoxFor(model => model.SelectedItems, new MultiSelectList(Model.AllItems, Model.SelectedItems), new { style = "width:225px;height:255px" }) Controller public ActionResult UserNew(IndexViewModel model, string add) { IndexViewModel model = new IndexViewModel { AllItems = new ...

Go to the complete details ...