Rajesh Dintakurthi

Rajesh Dintakurthi

  • 1.7k
  • 163
  • 3.7k

Searchable DropDownList in Asp.Net using Jquery Ajax

Oct 15 2018 4:50 AM
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#ddlSeason").searchable({
maxListSize: 200,
maxMultiMatch: 300,
exactMatch: true,
wildcards: true,
ignoreCase: true,
latency: 200,
warnMultiMatch: 'top {0} matches ...',
warnNoMatch: 'no matches ...',
zIndex: 'auto'
});
});
</script>
<div class="col-md-2 text-left">
<asp:UpdatePanel ID="UpdatePanel6" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DropDownList ID="ddlSeason" CssClass="validate[required] form-control" runat="server">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</div>
protected void BindSeason()
{
try
{
ddt = objDL.BindSeason(ConnKey);
objCommon.BindDropDownLists(ddlSeason, ddt, "SeasonName", "SeasonCode", "0");
ddlSeason.SelectedValue = "2";
}
catch (Exception ex)
{
ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
Response.Redirect("~/Error.aspx");
}
}

Answers (2)