[Solved] Bootstrap MultiSelect DropDownList from Database not displaying CheckBoxes

Last Reply one year ago By dharmendr

Posted one year ago

Show values from database in the dropdown list.

This is showing like this which i do not need.

where as i want to display look like this

I have written this HTML

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css"
rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>
<link href="http://cdn.rawgit.com/davidstutz/bootstrap-multiselect/master/dist/css/bootstrap-multiselect.css" rel="stylesheet" type="text/css" />

<script src="http://cdn.rawgit.com/davidstutz/bootstrap-multiselect/master/dist/js/bootstrap-multiselect.js" type="text/javascript"></script>

<script type="text/javascript">

$(function () {

$('[id*=lstHead]').multiselect({

includeSelectAllOption: true

});

});

</script>

 

<div class="col-md-3">

<label class="control-label" style="margin-top: 10px;">Head</label>

<asp:ListBox ID="lstHead" runat="server" SelectionMode="Multiple"

AutoPostBack="true" class="form-control"

onselectedindexchanged="lstHead_SelectedIndexChanged">

</asp:ListBox>
This question does not have replies that have been liked.