我想從Ext.net切換到select2 js。
我不知道如何將腳本與控件相結合。
這是我到目前爲止嘗試過的。如何結合select2 js和WebForms
我呆住了新的WebForms應用程序,通過的NuGet安裝選擇2,並嘗試從Project site
這裏重現樣本是怎麼看起來像我的aspx
<%@ 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>
<!--
<input id="e12" />
DO NOT WORK-->
<!--
<select id="e12">
<option></option>
</select>
DO NOT WORK-->
<!--<section id="e12"></section>-->
<!--
<asp:TextBox ID="e13" ClientIDMode="Static" runat="server"></asp:TextBox>
DO NOT WORK-->
<!-- This one only work as sample from web, others do not works-->
<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>
當我想申請我使用什麼類型的控件關於int的JS? 是否有任何使用select2 js的WebForms示例?