How to Implement Multiselect Listbox i.e selectbox with attribute mutiple = true. You need to Do a Save and Loading of data in pre-selected manner for Mutiselect listbox in asp.net mvc 4 razor. ? with full example as well as demo..
Thank you in advance.....
Loading

Lucky LaxmanPosted Feb 10, 2015, 11:25 PM
Will please give me the example what you what i can understand clearly and i can give you response
Thank you.
Shailesh PrajapatiPosted Feb 11, 2015, 1:40 AM
Joginder BangerPosted Feb 7, 2015, 6:26 AM
What is this code make a multiple select data??????????
Lucky LaxmanPosted Feb 7, 2015, 6:12 AM
I am giving this example Loading Drop down Values Statically you can modify too Dynamically
Now Please go like this..,
In Your Controller
// Index Code
Public ViewResult Index()
{
// This can be get the list of Values .
LoadDropDown();
return View();
}
// This Method Can Load values in List
Public Void LoadDropDown()
{
var DorpDlist = new SelectList(new[]
{
new {ID="1",Name="Adilabad"},
new{ID="2",Name="Hyderbad"},
new{ID="3",Name="Warangal"}, },
"ID", "Name", 1);
//This ViewBag Store the data Dynamic . You can use linke.
ViewBag.Cities = DorpDlist ;
}
// Code in View
@Html.DropDownList("Cities ","Select locations")
I hope it will help you. if help full are not help full please make a comment , i can improve to more given answers .
Thanks,