Click here to Skip to main content
15,994,794 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, How to Add an Empty List Box and move the items from one listbox to another listbox, and save the moved data into database in asp.net MVC using EF Code first,

In my Project I have create a list box which display the data from database code is like this

In Controller:
publicActionResult Create()
        {
IEnumerable<SelectListItem> items = db.IIDBS
                .Select(c =>newSelectListItem
                {
                    Value=c.InstituteName,
                    Text=c.InstituteName
                });
ViewBag.IIDBS = items;
return View();
        }


In View:
<fieldset>
         List of Financial Institute
<%:Html.ListBox("InstituteName",(IEnumerable<SelectListItem>) ViewBag.IIDBS,"Select Financial Institute Name") %>
</fieldset>


Here I want another empty Listbox and four button which move InstituteNameof first listbox to another listboxand save those data into database.

Can anyone tell me how to do this…….
Posted
Updated 22-Apr-14 0:36am
v2

1 solution

Hi,
Did u get the solution for the same...

Thanks,
Vijay Kumar
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900