I am using autocomplete for the Location names as shown
$(document).ready(function () {
debugger;
$('#txtLocationName').autocomplete({
source: 'LocationHandler.ashx?type='+ $("#<%= ddlDivision1.ClientID %> option:selected").val()
///LocationHandler.ashx?term=p
});
});
The Autocomplete should show the name base on what division is selected in Drop Down.
<td class="auto-style48">
<asp:DropDownList ID="ddlDivision1" CssClass="form-input-field" runat="server" ></asp:DropDownList>
</td>
<td class="auto-style48">
<asp:TextBox ID="txtLocationName" runat="server" Width="350px" CssClass="textboxAuto" Font-Size="12px" />
</td>
And in Handler i do have logic for divisiontype .
public class LocationHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
string term = context.Request["term"] ?? "";
string type = context.Request["type"] ?? "";
and in the type i am only getting "-1" and not selected value. not sure why ? please advice !!
Please advice !!