Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi!
Im trying to create my own autocomplete on a search field with my own custom handler.
But I dont know if Im doing this right.
This is the call from jquey automplete:
$(document).ready(function () {$(".SearchBox").autocomplete("AutoComplete.ashx");});
And this is my handler (simple so far just for testing):
public class AutocompleteData : IHttpHandler{ public void ProcessRequest(HttpContext context){ var specificNode = new Node(1052); var childNodes = specificNode.Children; string Query = context.Request.QueryString["q"]; //Iterating over nodes collection example foreach (Node node in childNodes){ string strNode = node.ToString(); if (strNode.IndexOf(Query) > -1){context.Response.Write(node.Name);} } } public bool IsReusable { get { return false; } }}
public
class AutocompleteData : IHttpHandler
{
public void ProcessRequest(HttpContext context)
var specificNode = new Node(1052);
var childNodes = specificNode.Children;
string Query = context.Request.QueryString["q"];
//Iterating over nodes collection example
foreach (Node node in childNodes)
string strNode = node.ToString();
if (strNode.IndexOf(Query) > -1)
context.Response.Write(node.Name);
}
public bool IsReusable { get { return false; } }
I've put the ashx file in the root of the website.
I have the same issue.
I'm using autocomplete on a textbox, everything works fine locally with the usercontrol, but I don't know know where to put the ashx
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Create Autocomplete with custom handler
Hi!
Im trying to create my own autocomplete on a search field with my own custom handler.
But I dont know if Im doing this right.
This is the call from jquey automplete:
And this is my handler (simple so far just for testing):
I've put the ashx file in the root of the website.
I have the same issue.
I'm using autocomplete on a textbox, everything works fine locally with the usercontrol, but I don't know know where to put the ashx
is working on a reply...