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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:56:01+00:00 2026-05-22T00:56:01+00:00

I am sure this is a simple solution, but I am at my end..

  • 0

I am sure this is a simple solution, but I am at my end..

I have the following ASPX

      <asp:TextBox ID="textVendorNameLookup" AutoPostBack="true" runat="server" Width="200px" 
                    onFocus="this.select()" 
                    Text=''></asp:TextBox>
                <ajaxToolkit:AutoCompleteExtender ID="VendorNameAutoCompleteExtender" TargetControlID="textVendorNameLookup"
                    FirstRowSelected="false" runat="server" ServiceMethod="GetVendor" CompletionInterval="1" 
                    EnableCaching="true" MinimumPrefixLength="1" UseContextKey="true" ServicePath="VendorLookupWebService.asmx">

                </ajaxToolkit:AutoCompleteExtender>

And the following ASMX

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Services;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Xml;


/// <summary>
/// Summary description for VendorLookupWebService
/// </summary>
[WebService(Namespace = "http://rouses.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
[System.Web.Script.Services.ScriptService]
public class VendorLookupWebService : System.Web.Services.WebService
{

    public VendorLookupWebService()
    {

        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    [WebMethod]
    //public string[] GetOrganization(string prefixText)
    public static List<String> GetVendor(string prefixText)
    {

        var cmdText = "Select vmvnnm from dbmoto..apvendp where vmvnnm like @prefixText and vmasts = 'A'";

        using (var conn = new SqlConnection(ConfigurationManager.ConnectionStrings["MAINConnectionString"].ToString()))
        using (var cmd = new SqlCommand(cmdText, conn))
        {
            cmd.Parameters.Add(new SqlParameter("@prefixText", string.Format("%{0}%", prefixText)));
            conn.Open();
            SqlDataReader dr = cmd.ExecuteReader();

            var Vendors = new List<string>();

            if (dr.HasRows)
            {
                while (dr.Read())
                {
                    Vendors.Add(dr["vmvnnm"].ToString());
                }
            }
            conn.Close();
            return Vendors;
        }

    }
}

But the webservice is not firing when I type into the textbox….

Any ideas?

  • 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-22T00:56:02+00:00Added an answer on May 22, 2026 at 12:56 am

    The GetVendor function must absolutely match the signature below:

    public string[] GetVendor(string prefixText, int count)
    

    as stated here:

    the return type and parameter name and
    type must exactly match, including
    case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I feel like there's a simple solution to this, but I'm not really sure
Im sure there is a very simple solution for this. I have a bunch
Im sure this is simple but newbie here. I have 5 URLS cards.php&type=one cards.php&type=two
Im pretty sure this has a simple solution. I am using jCarousellite, and i
I'm sure this is simple but I can't figure out how to achieve it:
Sorry, I'm sure this is simple but I'm tired and can't figure it out.
Im sure this is pretty simple but I just cant seem to find the
I'm sure this is something simple but I've been staring at it for a
I'm sure this is really simple, but I can't for the life of me
I'm sure this is really simple and I'm drawing a giant blank, but how

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.