1 Replies - 1850 Views - Last Post: 22 April 2014 - 09:47 PM Rate Topic: -----

#1 user123459  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 18-April 14

How to Add Empty ListBox & move the items from listbox1 to listbo

Posted 22 April 2014 - 03:40 AM

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>
<legend>MEMBER ACCESS RIGHTS</legend>
<divstyle="text-decoration: underline; text-align: center"><strong><spanstyle="background-color: #FFFFFF">MEMBER ACCESS RIGHTS</span></strong></div>
         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…….
Please help…

Is This A Good Question/Topic? 0
  • +

Replies To: How to Add Empty ListBox & move the items from listbox1 to listbo

#2 user123459  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 18-April 14

Re: How to Add Empty ListBox & move the items from listbox1 to listbo

Posted 22 April 2014 - 09:47 PM

Is anyone here who reply me..............
:helpsmilie:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1