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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:57:58+00:00 2026-05-29T23:57:58+00:00

Im trying to implement an asp.net textbox using the jQuery UI Autocomplete widget http://jqueryui.com/demos/autocomplete/#remote

  • 0

Im trying to implement an asp.net textbox using the jQuery UI Autocomplete widget http://jqueryui.com/demos/autocomplete/#remote.

The source property of the widget expects a string to point to a URL resource that will return JSON data. I have an aspx page that will return the following:

Code Behind:

private void GetWidgets(string name)
{
    var jscriptSerializer = new JavaScriptSerializer();
    var widgets = jscriptSerializer.Serialize(GetMatchingWidgets(name));
    var script = "Widgets = {\"Widget\": " + widgets + "};";

    Page.ClientScript.RegisterStartupScript(Page.GetType(), "JSON", script, true);
}

Questions:

  1. The documentation says the The request parameter "term" gets added to that URL. — I should therefore be able to get the “term” as a query string parameter correct?
  2. Do I have to set the JSON to a variable on the client or does the widget take care of the binding without having to do anything else?

Am I missing anything else?

I would give this a try and just “figure it out” but I don’t have a whole lot of time to spend on this solution.

Help is always appreciated.

  • 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-05-29T23:57:59+00:00Added an answer on May 29, 2026 at 11:57 pm

    Yes, term is the name of the QueryString parameter. All you need to do is return json data in the expected format. For example, here is the class I use…

    /// <summary>
    /// JQuery UI Autocomplete plugin expects an object with "value" and/or "label" property.
    /// </summary>
    public class AutoCompleteData
    {
        /// <summary>
        /// custom property
        /// </summary>
        public string id { get; set; }
    
        /// <summary>
        /// value is shown in text box after selection
        /// </summary>
        public string value { get; set; }
    
        /// <summary>
        /// label is shown in drop down list
        /// </summary>
        public string label { get; set; }
    }
    

    for example…

    string term = Request.QueryString["term"];
    
    AutoCompleteData[] d = GetMatchingWidgets(term)
        .Select(x => new AutoCompleteData {
            label = x.widgetLabel,
            value = x.widgetValue
        }).ToArray();
    
    return jscriptSerializer.Serialize(d);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to implement some tree like that in ASP.NET: alt text http://i.msdn.microsoft.com/w6ws38fw.vbVenusSiteNavigation_TreeView1(en-us,VS.100).gif
I'm building a calendar in ASP.NET using Jquery, And I'm trying to implement Print.
I'm trying to implement a paging and sorting list in ASP.NET MVC without using
I'm developing an asp.net (classic) application trying to implement the MVP pattern using this
I've been trying to implement jQuery's grid function in my Asp.Net MVC app. I'm
I'm trying to implement exception handling in ASP.NET MVC3 using the HandleError attribute. The
I am trying to implement a RESTful MVC project using C# and ASP.Net, accordingly
I'm trying to implement a simple ActionLink that will delete records using ASP.NET MVC.
I have an ASP.NET webforms application and trying to implement jQuery autocomplate on a
I am trying to implement an autocomplete in ASP.NET MVC 3, following this post

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.