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 8301887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:09:10+00:00 2026-06-08T17:09:10+00:00

I want to implement jquery textbox auto suggest in my c# asp.net application for

  • 0

I want to implement jquery textbox auto suggest in my c# asp.net application for the purpose of searching employees.Now i am using ajax auto suggest in my application but it’s seems to be slow when data more than 50000 thousand.Somebody please help me.If any great idea about faster serching with huge data without using indexing please share with me.

  • 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-08T17:09:11+00:00Added an answer on June 8, 2026 at 5:09 pm

    jQuery Auto search details given bellow : Put down this code in your .aspx file. Here txtSearchBox is search box name.

    <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    <title>AutoComplete Box with jQuery</title>
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>  
    <script type="text/javascript">
        $(document).ready(function() {
            SearchText();
        });
        function SearchText() {
            $("#txtSearch").autocomplete({
                source: function(request, response) {
                    $.ajax({
                        type: "POST",
                        contentType: "application/json; charset=utf-8",
                        url: "Default.aspx/GetAutoCompleteData",
                        data: "{'username':'" + document.getElementById('txtSearch').value + "'}",
                        dataType: "json",
                        success: function(data) {
                            response(data.d);
                        },
                        error: function(result) {
                            alert("Error");
                        }
                    });
                }
            });
        }
    </script>
       </head>
       <body>
       <form id="form1" runat="server">
       <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel>
            <ContentTemplate>
                <div class="demo">
            <div class="ui-widget">
                <label for="tbAuto">Enter UserName: </label>
                <asp:TextBox ID="txtSearch" runat="server" AutoCompleteType="Search"> </asp:TextBox>
            </div>
    </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    
    </form>
    </body>
    </html>
    

    Now .cs file details:

    public partial class _Default : Page 
    {
      protected void Page_Load(object sender, EventArgs e)
       {
    
       }
    [WebMethod]
    
    public static List<string> GetAutoCompleteData(string username)
    {
     List<string> result = new List<string>();
    
     using (SqlConnection con = new SqlConnection("Data Source=devserver;Initial     Catalog=Catalog;Persist Security Info=True;User ID=userName;Password=Password"))
    {
     using (SqlCommand cmd = new SqlCommand("select (strEmployeeName + ',' + strEmployeeCode) as username from tblEmployee where strEmployeeName LIKE '%'+@SearchText+'%' ", con))
    {
     con.Open();
     cmd.Parameters.AddWithValue("@SearchText", username);
     SqlDataReader dr = cmd.ExecuteReader();
     while (dr.Read())
    {
     result.Add(dr["username"].ToString());
    }
     return result;
    }
    }
    }  
    }
    

    If you wish you can use object data source like:In this case your object method should return List type data.

    [WebMethod]
    public static List<string> GetAutoCompleteData(string strSearchKey)
    {
        AutoSearch_BLL objAutoSearch_BLL = new AutoSearch_BLL();
        List<string> result = new List<string>();
        result = objAutoSearch_BLL.AutoSearchEmployeesData(strSearchKey);
        return result;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an ASP.NET MVC site where I want to implement jQuery AJAX calls
I want to implement auto complete feature in a rails application. I am using
I want to implement a jQuery Mobile application without browser history navigation (feel free
I am NEW in jQuery and I am using Visual Studio 2010 ASP.NET Pages
I've been working on my first major ASP.NET MVC application (plus lots of jQuery)
I want to implement the jQuery validation plugin for use in a web application
I have a website with ajax loaded content. Now I want to implement the
I want to implement keyboard shortcuts using jQuery. Specifically, I want to fire an
http://rndnext.blogspot.com/2009/02/jquery-ajax-tooltip.html I want to implement something like the link above. Now this pops up
I have a PHP/jQuery/AJAX/MySQL app built for managing databases. I want to implement the

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.