Today, I will show you how to creat Multi-Select Dropdown With Checkbox in ASP.NET MVC.
1. MVC set Viewdata in controller inside save get method using foreach loop.

2. Within view write foreach loop for multiselect dropdown with checkboxlist. And now, write the following code:
<div id="divStudentlist" style="height: 100px; overflow: auto; border: solid; width: 150px;"> 
@foreach (var items in ViewData["Items"] as List 
<SelectListItem>) { 
    <table width="100%"> 
    <tr> 
        <td width="20px"> 
            <input type="checkbox" value="@items.Value" class="chkclass" /> 
        </td> 
        <td width="100px"> 
            @items.Text 
        </td> 
    </tr> 
    </table> 
    } 
</div> 

3. Now the question arises, how will you send your chosen items values to controller as a result of once you get the values into the controller, you'll be able to do something like save into database. therefore let’s perceive the subsequent jQuery code. Before that, you must place @Html.Hidden("idlist") within Ajax.BeginForm and currently write jQuery code as you can see below:
var idslist = ""; 
$("input:checkbox[class=chkclass]").each(function() { 
if ($(this).is(":checked")) { 
    var userid = $(this).attr("value"); 
    idslist = idslist + userid + ','; 

}); 
$("#idlist").val(idslist); 


4. Inside controller add/save post technique ought to have the subsequent parameter: (FormCollection frm) and then write the subsequent c# code:
string[] i1; 
string items = frm["idlist"]; 
if (items != null) { 
i1 = items.Split(new [] { 
    "," 
}, StringSplitOptions.RemoveEmptyEntries); 
for (int i = 0; i < i1.Length; i++) { 
    string s = i1[i]; /*Inside string type s variable should contain items values */ 

HostForLIFE.eu ASP.NET MVC 6 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.