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

  • Home
  • SEARCH
  • 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 4236810
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:41:25+00:00 2026-05-21T02:41:25+00:00

I am using Autocomplete using web service. And in my web service I am

  • 0

I am using Autocomplete using web service. And in my web service I am using LDS.

The problem is that when I am trying this code:

This is my UI code which is calling the webservice in Default.aspx:

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    <Services>
    <asp:ServiceReference Path ="WebService1.asmx" />
    </Services>
    </asp:ToolkitScriptManager> 

    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

    <asp:AutoCompleteExtender ID="TextBox1_AutoCompleteExtender" runat="server" 
        DelimiterCharacters="" Enabled="True" ServicePath ="WebService1.asmx" ServiceMethod="ReturnEntity" EnableCaching="true"  TargetControlID="TextBox1" CompletionSetCount ="1">
    </asp:AutoCompleteExtender>

This is my WebService file (webservice1.asmx)

 [WebMethod]
    public string[] ReturnEntity(string prefixText, int count)
    {
        List<string> responses = new List<string>();
        for (int i = 0; i < count; i++)
            responses.Add(prefixText + (char)(i + 65));

        return responses.ToArray();
    }

Then is it working. However, I am working on this code and it is NOT working…

 [WebMethod]
    public string[] ReturnEntity(string prefixText)
    {
        using (DataClasses1DataContext search = new DataClasses1DataContext())
        {
            string[] fullText = (from n in search.Entities
                                 where n.Name.StartsWith(prefixText)
                                 select n.Name).ToArray();

            return fullText;
        }

    }

When I am trying to run the webservice in the browser itself and passing some parameters then it is showing me these:

  <?xml version="1.0" encoding="utf-8" ?> 
- <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
  <string>Starr</string> 
  <string>Sally Jeans</string> 
  <string>Steven Kline</string> 
  <string>Steven Goldberg</string> 
  </ArrayOfString>

This is not returning any results. I just want to show listings from my table which is Entities, and the column name is ‘Name’.

Cannot figure it out 🙁

  • 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-21T02:41:26+00:00Added an answer on May 21, 2026 at 2:41 am

    Try using StartsWith and pass in a StringComparison

    var result = from n in search.Entities
                 where n.Name.StartsWith(prefixText, 
                     StringComparison.InvariantCultureIgnoreCase)
                 select n.Name;
    
    return result.ToArray();
    

    If this is still in the context of call you can use ToLower()

    var result = from n in search.Entities
                 where n.Name.ToLower().StartsWith(prefixText.ToLower())
                 select n.Name;
    
    return result.ToArray();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using this autocomplete Plugin which works great but the problem is $('#request_song').autocomplete({
I'm trying to use the official jQuery autocomplete plugin with an ASMX web service
I have implemented the Ajax Autocomplete feature in my application using a web service
I'm using the jQueryUI autocomplete widget to get data from a JSON web service.
I'm using the jQuery autocomplete plugin to get a list of locations, which works
I followed the directions in this post: how can we integrate jquery autocomplete using
I am using autocomplete extender, i write a webservice the webservice is working fine
I do not know what is wrong with this code. alert shows that data
I am using autocomplete plugin in my form. I am using this autocomplete feature
I'm using jQuery UI Autocomplete 1.8.1 with Jquery 1.4.2 and I have this issue.

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.