.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

ashx handler using jquery autocomplete

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :ASP.Net
Hi, i have using jquery for autocompelete option and iam using ashx file , i have 2textbox  , i need to show diffrent search record in the text box, iam using 2 ashx file to show the value using jquery, i want to user single ashx file instead of iam using 2 ashx handle filercan use switch case to handle this , i want to use 7textbox  all textbox i need to do autosearch, how to handlethis senario using jquery and ashx handler file below the code this is my codebehind query clsquery.updatetablestring = "select top 2 Cont_number from ASPrearrival_list where Cont_number";         clsquery.updatetablestring = "select top 2 custid,custname from ASCustomer where custname"; // this is my auto search iam using 2 handler file , i wants only one handler instead of 2handler <script type="text/javascript" src="jquery.autocomplete.js"></script>      <script type="text/javascript">       $(document).ready(function()       {                       $("#<%=txtcontno.ClientID%>").autocomplete("Handler1.ashx");           $("#<%=txtcname.ClientID%>&q

View Complete Post

More Related Resource Links

jquery autocomplete multiple values


i got some samples and i did autocomplete using jquery , its working well for single input values

but i need to pass multiples values after one by one in the textbox. Is it possible to pass multiple

values in the textbox for autocomplete in jquery in asp.net?


build repository from SQL 2005? for a Linq, Jquery autocomplete



  I have the a question am going about his correctly I have a database for categories, it has many fields and about 4000 records,  but with a Jquery autocomplete needing speed and the fact that I only need to return a key and category name. I did the following:  (oh just to note, MVC2, Ajax project)


    public class categorySearch
        public Guid Category_GUID { get; set; }
        public string Category_Name { get; set; }


and now for the repository

    public class categoryRepository
        internal List<categorySearch> FindCategory(string searchText, int maxResults)
            List<categorySearch> category = new List<categorySearch>();
            dbWebEntities storedb = new dbWebEntities(); 

            var getcat = storedb.Categories.ToList();

            foreach (var item in getcat)
                category.Add(new categorySearch { Category_GUID = item.Cat_GUID, Category_Name = item.Category_Name});

            var result = from c in category
                         where c.Category_Name.Contains(searchText)
                         orderby c.Category_Name

jquery autocomplete selected value



Iam using jquery autocomplete to search data and i have button to get the detail value of employee and

display in label , what i need is that , i don't want to put button to get detail , instead i need to select the from\

auto search and press enter key  and show the detail in the lablel example(empname,address, emailid).

Looking forward valuable suggestions

jQuery UI Autocomplete, Web Services and JSON

Hi guys, this is my first post, I´m desperate after wasting 2 days in google and reading forums ans sites. I can´t make it work. I just want to provide the name of cities to show in the autocomplete plugin. Let´s go part by part:WEB SERVICE: I use the Json.Net component to serialize a datasetpublic string ConsultTable(string data) { SqlConnection connection = new SqlConnection(WebConfigurationManager.ConnectionStrings["SqlServerConnection"].ToString()); SqlCommand command = new SqlCommand("SELECT name FROM cities",connection); connection.Open(); DataSet dataset = ToDataSet(command.ExecuteReader()); Newtonsoft.Json.JsonSerializer json = new Newtonsoft.Json.JsonSerializer(); json.NullValueHandling = NullValueHandling.Ignore; json.ObjectCreationHandling = Newtonsoft.Json.ObjectCreationHandling.Replace; json.MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore; json.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; json.Converters.Add(new DataSetConverter()); StringWriter sw = new StringWriter(); Newtonsoft.Json.JsonTextWriter writer = new JsonTextWriter(sw); writer.Formatting = Formatting.None; writer.QuoteChar = '"'; json.Se

ASHX Handler + Threads

Hello guys,I have a page named Calculate.ashx, the page will be called every 10 seconds until a complete result is available.I need to start 3 external applications, each to fetch information for me, the whole thing would take about 3 minutes.My question is, how do I start 3 threads and "keep in touch" with them from the ashx code, even though the context of the file will endbecause I have to send a response to client?I'm not sure I am clear so i'll try to explain it again in a different way,when a request arrives to Calculate.ashx for the 1st time, Calculate.ashx will start 3 Threads, each with it's own job.Now i need to answer the client with ResponseWrite or something, and the ashx file flow will end.In 10 seconds, the client will again send a request to Calculate.ashx, now Calculate.ashx needs to check the state of the Threads it created 10 seconds ago,Will these Threads still exist? won't they be deleted because the context ended 10 seconds ago?How do I keep the "pointers" to those Threads?Thank you!Eitam. 

Losing my mind, trying to publish a site with a .ashx handler


Happy Saturday everyone -


I am trying to work on a bit of a new idea to me, using .ashx files.  I understand that .ashx files need to be registered in the web.config, but I am not understanding how that works.

My .ashx file is 'album.ashx'.  My issue is that my site runs properly locally when I test it, I am just unable to publish it (locally or otherwise) - I receive the following error:

There is no build provider registered for the extension '.ashx'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.   


Inside of system.web I realize that I need to register this file, and using a template I found online this is what I have so far:




JQuery Autocomplete Call WCF Service Method


I am trying to use the below code to call a wcf service method for Autocomplete functionality in a TextBox.  I have written the following query:

$(document).ready(function () {
            $("#<%= txtCompany.ClientID %>").autocomplete(http://localhost/PieScore/PieScore.Application.Services/EmployeeService.svc/GetTestCompanyList, {
                dataType: 'json',
                parse: function (data) {
                    var items = data.d;
                    var parsed = [];
                    for (var i = 0; i < items.length; i++)
                        parsed[i] = {

jquery autocomplete not firing




iam using jquery auto complete for ,but its not firing handlerold.ashx file,

pls give valuable suggestions

script type="text/javascript">
//      $(document).ready(function()
//      {
        $("#<%=txtguages.ClientID%>").autocomplete('Handlerold.ashx',{minChars:1,extraParams:{"param1":"1"}}).result(function (event, data, formatted) {
        if (data) {
            alert('Value: '+ data[1]);
            $("#<%= Hdnguages.ClientID %>").val(data[1]);
        else {
            $("#<%= Hdnguages.ClientID %>").val('-1');

handlerold.ashx code below

<%@ WebHandler Language="C#" %>

using System;
using System.Web;
using vdatalayer;
using System.Data.SqlClient;
using S

jquery autocomplete



has anyone ever tried jquery multiple autocomplete (http://jqueryui.com/demos/autocomplete/#option-source ). How do I filter itbased on the first char?so instead of '%_%' it will be '_%'


jquery autocomplete does not show


Hi all

im trying to get a autocomplete with jquery

this is what i  have:


<%@ WebHandler Language="VB" Class="cityAutoComplete" %>

Imports System
Imports System.Web
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Text

Public Class cityAutoComplete : Implements IHttpHandler
    Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
        Dim clDb As New myClassDb
        Dim prefixText As String = context.Request.QueryString("q")
        Dim sql As New SqlCommand
        sql.Connection = clDb.getConnection
        sql.CommandText = ("select CityName, CityId from tblCityVariant where " & _
                           "CityName like @SearchText + '%'")
        sql.Parameters.AddWithValue("@SearchText", prefixText)
        Dim sb As StringBuilder = New StringBuilder
        Dim sqlReader As SqlDataReader = sql.ExecuteReader

        While sqlReader.Read
            sb.Append( & sqlReader.Item(0)).Append(Environment.NewLine)
        End While

    End Sub
    Public ReadOnly Property IsReusable() As Boo

Adding a messagebox to an ASHX Handler


Is it possible to add a messagebox to an ASHX Handler? I used a handler to pass data from a Web Service to an internal system and need a messagebox to pop up to ask the user to choose from one option or another. 

JQuery autocomplete and non english characters


I have implemented the jquery autocomplete with a handler.

The result script is as follow.

<script type="text/javascript">
$(document).ready(function() {
    $("#ctl00_ContentPlaceHolder1_tbDepature").autocomplete('StopsService.ashx', { width: 310 });
    $("#ctl00_ContentPlaceHolder1_tbDestination").autocomplete('StopsService.ashx', { width: 310 });

In StopsService.ashx i populate the content passed in with values with all english and values with all Greek characters.

The autocomplete works fine and as expected with the english characters but it doesnt display at all any options with Greek characters.

Any ideas? Is the problem on the jquery side or the handler side?

Do i need any encodings in the ashx service?

Retrieving JQuery Ajax Parameter in ASHX (Handlers) files


Hi everyone;

I have an Jquery Ajax which sends JSON data to an *.ashx file (In data section of JQuery Ajax command). 

Now, I'm asking how can I retrieve this string (data) in my ashx file



jQuery Autocomplete with WebService



I am using the jQuery autocomplete. I get the data bu a WebService. I pretty sure that the WebService return the good value (I checked it with a breakpoint and with firebug's console).

This is the javascript code:

$(document).ready(function() {
        type: "POST",
        url: "WebService.asmx/GetClientFromDb",
        data: "{}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        sucess: function(data) {
                source: data,
                minLength: 0
        error: function() {
            alert("Error in WebService");

The alert box is not fired so I guess the WebService call is a sucess. If someone see my mistake, let me know



ASHX Handler KeepAlive SQL Connection?




I have an ASHX Handler file, the file is connecting to an SQL server


SqlConnection con = new SqlConnection(SQL.ConnectionString()); 


I send request every 1 second to this ASHX page.

Now my question is, is it neccessery to keep the connection with the SQL alive?

Is request every 1 seconds is too much?

Any suggestions?




Problem with Web Handler - Code works as .aspx, but not .ashx


I'm trying to cover a page that is code-only to a web handler. However, I'm having problems figuring out why the code works when used in the code-behind for the .aspx file but not the .ashx page.

.ASPX Page Code Behind


Partial Class launchsite
    Inherits System.Web.UI.Page

    Protected Sub Page_Load() Handles Me.Load

        If Len(Session("UserDashboardURL")) > 0 Then
            If Len(Session("UserCurrentShowNumber")) = 0 Then
                Response.Redirect("~/development/content/dashboards/" + Session("UserDashboardURL"))
                If InStr(Session("UserDashboardURL"), "?") = 0 Then
                    Response.Redirect("~/development/content/dashboards/" + Session("UserDashboardURL") & "?ShowNumber=" & Session("UserCurrentShowNumber"))
                    Response.Redirect("~/development/content/dashboards/" + Session("UserDashboardURL"))
                End If
            End If
        End If

    End Sub

End Class



<%@ WebHandler Language="VB" Class="Handler" %>

Imports System
Imports System.Web
Imports System.Web.HttpContext
Public Class Handler : Implements IHttpHandler
    Public Sub ProcessR

GridView Confirmation Box Using JQuery BlockUI in asp.net

JQuery is the most popular JavaScript library. One of the main reasons for its fame is the plugin architecture. Anyone can create a separate library that leverage the JQuery library. In this article we are going to look at the BlockUI library which is used to block the user screen while performing a task.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend