js-example-basic-single does not show search box ?

179 views
Skip to first unread message

kpu...@gmail.com

unread,
Sep 11, 2017, 4:34:00 PM9/11/17
to select2
I used nuget to add jQuery to my web site. It added version 3.1.1. I downloaded select2 css and js which i put in the Scripts/selec2 folder in my web site. version of select 2 is 4.0.3.

i end up with a basic regular select box? Your help in this matter would be greatly appreciated.

kind regards,

Karen


current code:


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="Scripts/select2/select2.css" rel="stylesheet" />
<script src="Scripts/jquery-3.1.1.min.js" type="text/javascript"></script>
<script src="Scripts/select2/select2.js"></script>
<script type="text/javascript">
$(".js-example-basic-single").select2();
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="'myModel">

<select class ="js-example-basic-single">
<option value ="A">A</option>
<option value ="B">B</option>
<option value ="C">C</option>
</select>
<asp:Button ID="btnSubmit" runat="server" Text="Button" />
</div>
</form>
</body>
</html>

jmarco...@gmail.com

unread,
Jul 24, 2018, 6:44:44 PM7/24/18
to select2
Reply all
Reply to author
Forward
0 new messages