[Solved] ASP.Net Error: The style sheet must be part of the current project

Last Reply 16 days ago By dharmendr

Posted 16 days ago

I wanted multiselect dropdown list but am getting following error.

Unable to edit 'http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css' The style sheet must be part of the current project and the project must be a web site or web application project.

below is my code.

<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*=lstEmployee]').multiselect({
            includeSelectAllOption: true
        });
    });
</script>
 
Employee : 
<asp:ListBox ID="lstEmployee" runat="server" SelectionMode="Multiple">
    <asp:ListItem Text="Nikunj Satasiya" Value="1" />
    <asp:ListItem Text="Dev Karathiya" Value="2" />
    <asp:ListItem Text="Hiren Dobariya" Value="3" />
    <asp:ListItem Text="Vivek Ghadiya" Value="4" />
    <asp:ListItem Text="Pratik Pansuriya" Value="5" />
</asp:ListBox>
<asp:Button Text="Submit" runat="server" OnClick="Submit" />

kindly help me thank you.

You are viewing reply posted by: dharmendr 16 days ago.
Posted 16 days ago

Hi shal,

Use below code.

HTML

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/js/bootstrap-multiselect.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/css/bootstrap-multiselect.css" />
<script type="text/javascript">
    $(function () {
        $('[id*=lstEmployee]').multiselect({
            includeSelectAllOption: true
        });
    });
</script>

Employee :
<asp:ListBox ID="lstEmployee" runat="server" SelectionMode="Multiple">
    <asp:ListItem Text="Nikunj Satasiya" Value="1" />
    <asp:ListItem Text="Dev Karathiya" Value="2" />
    <asp:ListItem Text="Hiren Dobariya" Value="3" />
    <asp:ListItem Text="Vivek Ghadiya" Value="4" />
    <asp:ListItem Text="Pratik Pansuriya" Value="5" />
</asp:ListBox>

Screenshot