I have read this post: Passing extra parameters to source using Jquery UI autocomplete
I am develping a Web Page in Asp.net C#.
My HTML code:
<input class="tags" to_search="Birds" />
<input class="tags" to_search="Animals" />
Javascript:
$(document).ready(function() {
$(".tags").autocomplete({
source: "GenericHandler.ashx?name="+$(this).attr("to_search")
});
});
I want to pass the to_search attribute of the <input> tag to generic handler.
Above code is calling GenericHandler.ashx but gives null value of name.
How can I get name value equals to the to_search attribute of <input> tag?
Please help.