Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8336867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:07:29+00:00 2026-06-09T04:07:29+00:00

I am using the jQuery autocomplete plugin. Not jQueryUI autocomplete. I can’t seem to

  • 0

I am using the jQuery autocomplete plugin. Not jQueryUI autocomplete. I can’t seem to find any good instructions on jQuery autocomplete.

Does anyone know how to get multiple search parameters and results.
ie. User can search either ID, FNAME, LNAME and the autocomplete shows the results accordingly?

So search JON auto complete returns JON DOE N41, JONATHAN MILLER Q66

or

Search Q6 auto complete returns JONATHAN MILLER Q66, MIKE CAMPBELL Q67, etc

Here is my current code.

ashx handler:

public class Search_CS : IHttpHandler {

    public void ProcessRequest (HttpContext context) {
        string prefixText = context.Request.QueryString["q"];
        using (SqlConnection conn = new SqlConnection())
        {
            conn.ConnectionString = ConfigurationManager
                    .ConnectionStrings["Rollup2ConnectionString"].ConnectionString;
            using (SqlCommand cmd = new SqlCommand())
            {
                cmd.CommandText = "select NUID from T_USER where " +
                "NUID like @SearchText + '%'";
                cmd.Parameters.AddWithValue("@SearchText", prefixText);
                cmd.Connection = conn;
                StringBuilder sb = new StringBuilder(); 
                conn.Open();
                using (SqlDataReader sdr = cmd.ExecuteReader())
                {
                    while (sdr.Read())
                    {
                        sb.Append(sdr["NUID"])
                            .Append(Environment.NewLine);
                    }
                }
                conn.Close();
                context.Response.Write(sb.ToString()); 
            }
        }
    }

    public bool IsReusable {
        get {
            return false;
        }
    }
}

And here is my HTML:

<script src="Scripts/jquery.autocomplete.js" type="text/javascript"></script>
<link href="Autocomplete/jquery.autocomplete.css" rel="stylesheet" type="text/css" />  

<script type="text/javascript">
    $(document).ready(function() {
        $("#<%=txtSearch.ClientID%>").autocomplete('Autocomplete/Search_CS.ashx', {width: 400, multiple: true, matchContains: true });
    });

</script> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:07:30+00:00Added an answer on June 9, 2026 at 4:07 am

    It’ll have to do with your SQL query. You’ll want to target those columns in your database and search all of them just like NUID.

    cmd.CommandText = "select NUID, FNAME, LNAME from T_USER where NUID like @SearchText + '%' OR FNAME like @SearchText + '%' OR LNAME like @SearchText + '%'";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the popular JQuery Autocomplete plugin below. http://jqueryui.com/demos/autocomplete/ Currently if you type a
I am using JQuery's autocomplete plugin, but it is not fast and also it's
I'm using the jQuery Autocomplete plugin from http://docs.jquery.com/Plugins/Autocomplete on IE7 and it's not releasing
I'm using jQuery Autocomplete plugin 1.1 now, not the one included in jQuery UI.
I'm using jQuery autocomplete plugin from jQuery website calling the controller url which return
I'm using this JQuery autocomplete plugin http://www.devbridge.com/projects/autocomplete/jquery/ in my project. I followed this tutorial
Let me clarify: I'm using standard jQuery autocomplete plugin (bassistanse.de) and bind it to
I'm using the following JQUERY Autocomplete plug-in: jQuery Plugin: Tokenizing Autocomplete Text Entry What'd
I m using autocomplete from http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ i managed to get data from server in
I'm using Jorn Zaefferer's Autocomplete query plugin, http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ I have options set so it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.