Shal

Shal

  • 1.5k
  • 245
  • 3.7k

error in checkbox in dropdownlist asp.net c# dynamically

Mar 26 2021 5:43 AM
I wanted multiselect dropdown list but am getting following error.
 
 
 
below is my code.kindly help me thank you.
  1. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>  
  2. <link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css"  
  3. rel="stylesheet" type="text/css" />  
  4. <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>  
  5. <link href="http://cdn.rawgit.com/davidstutz/bootstrap-multiselect/master/dist/css/bootstrap-multiselect.css"  
  6. rel="stylesheet" type="text/css" />  
  7. <script src="http://cdn.rawgit.com/davidstutz/bootstrap-multiselect/master/dist/js/bootstrap-multiselect.js"  
  8. type="text/javascript"></script>  
  9. <script type="text/javascript">  
  10. $(function () {  
  11. $('[id*=lstEmployee]').multiselect({  
  12. includeSelectAllOption: true  
  13. });  
  14. });  
  15. </script>  
  16. Employee : <asp:ListBox ID="lstEmployee" runat="server" SelectionMode="Multiple">  
  17. <asp:ListItem Text="Nikunj Satasiya" Value="1" />  
  18. <asp:ListItem Text="Dev Karathiya" Value="2" />  
  19. <asp:ListItem Text="Hiren Dobariya" Value="3" />  
  20. <asp:ListItem Text="Vivek Ghadiya" Value="4" />  
  21. <asp:ListItem Text="Pratik Pansuriya" Value="5" />  
  22. </asp:ListBox>  
  23. <asp:Button Text="Submit" runat="server" OnClick="Submit" />  

Answers (3)