I am looking to make the switch from Ext.net to select2 js, but I'm struggling with integrating scripts and controls.
So far, I have started a new WebForms App, installed select2 through NuGet, and attempted to replicate a sample from the Project site.
Here is what my aspx code looks like:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="select2_test.Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test Select 2</title>
<script src="Scripts/jquery-1.7.2.js"></script>
<script src="Scripts/select2.js"></script>
<link href="Content/css/select2.css" rel="stylesheet" />
<script type="text/javascript">
$("#e12").select2({ tags: ["red", "green", "blue"] });
</script>
<script type="text/javascript">
$(document).ready(function () { $("#e1").select2(); });
</script>
</head>
<body>
<form id="form1" runat="server" >
<div>
<!-- This one only works as a sample from the web, others do not work -->
<select id="e1">
<option value="0">Test 0</option>
<option value="1">Test 1</option>
<option value="3">Test 3</option>
</select>
</div>
</form>
</body>
</html>
What type of control should I use when applying JS on int data types? Are there any examples of using select2 js in WebForms?