For searching through dropdown lists in my project, I have implemented the Chosen jQuery plugin.
In the Master page before the closing body tag, ensure to include the necessary CSS and jQuery script files.
<link href="/assets/css/chosen.css" rel="stylesheet" />
<script src="/assets/css/chosen.jquery.js"></script>
<script src="/assets/css/chosen.jquery2.js"></script>
I styled the dropdown list with a class named "chzn-select" as shown below:
<asp:DropDownList ID="Dropworktype" runat="server" CssClass="chzn-select" AutoPostBack="True" >
<!-- List items here -->
</asp:DropDownList>
The search functionality of the chosen jQuery is working fine on my page. However, it seems to be having issues when implemented in a user control page. If you have any insights or solutions to this problem, please let me know. Thank you!
This is an example of my user control page structure:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Basic-Inser-Details.ascx.cs" Inherits="Grievance.User_Controls.Basic_Inser_Details" %>
<!-- Validation script goes here -->
<link href="../assets/css/chosen.css" rel="stylesheet" />
<script src="../assets/css/chosen.jquery.js"></script>
<script src="../assets/css/chosen.jquery2.js"></script>
<%-- Other controls and HTML content are included within this user control page layout --%>