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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:38:45+00:00 2026-05-24T16:38:45+00:00

I am trying to do auto suggest in a TextBox and I used Ajax

  • 0

I am trying to do auto suggest in a TextBox and I used Ajax controls to do so. I am giving movies array some values. I want to give that value from the database by filtering the user table with the email Id that the User used to Login to the website. I am not able to call the Label value into the method below. I have stored the email id of user in label during page load. help me to do that.

[System.Web.Services.WebMethodAttribute(),System.Web.UI.WebControls, System.Web.Script.Services.ScriptMethodAttribute()]
public static string[] GetCompletionList(string prefixText, int count, string contextKey)
{
   // Create array of movies
    string[] movies = {"Joey", "Joester", "Joker", "Joeic", "Joic", "Shrek II"};

    // Return matching movies
    return (from m in movies where m.StartsWith(prefixText,StringComparison.CurrentCultureIgnoreCase) select m).Take(count).ToArray();
}
  • 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-24T16:38:45+00:00Added an answer on May 24, 2026 at 4:38 pm

    If you are using the AJAX Control Toolkit you can see example here.

    I am not sure what is the label about, but you need to set UseContextKey=true; and specify the context key for the ajaxToolkit:AutoCompleteExtender

    In your case you can add the following code to Page.Load:

    if(!Page.IsPostBack)
    {
      AutoCompleteExtenderID.ContextKey = LabeWtihEmal.Text;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to customise the following Auto Suggest jQuery plugin: Ajax autocomplete with AJAX
I'm trying to make some auto suggest stuff for an app. But i'm having
Hi i am trying to auto populate a 2d array based on user input.
Im trying to get some auto complete to work. I have this URL i
I'm trying to implement a facebook search in my system (auto suggest while typing).
I am trying to do some auto testing and I need to trigger a
I'm trying to build auto suggest functionality using Solr. The index contains different locations
I am trying to find some plugin like the one, used in this website
I'm trying to make sure some data is auto-deleted when there's no more references
I'm trying to get an auto-suggest like Google has but without the dropdown. By

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.