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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:50:25+00:00 2026-05-11T13:50:25+00:00

This is c# .net 2.0. I am using a masterpage. The WebService works fine

  • 0

This is c# .net 2.0. I am using a masterpage.

  • The WebService works fine on its own.
  • I am completely stumped. When I type in the TextBox, nothing happens.

Files:

EditTicket.aspx AutoComplete.asmx App_Code/AutoComplete.cs

EditTicket.aspx:

        <%@ Register Assembly='AjaxControlToolkit' Namespace='AjaxControlToolkit' TagPrefix='cc2' %>           <asp:ScriptManager id='ScriptManager1' runat='server' EnablepageMethods='true'>         <Services>             <asp:ServiceReference Path='AutoComplete.asmx' />         </Services>         </asp:ScriptManager>      <cc2:AutoCompleteExtender          runat='server'           ID='AutoCompleteExtender1'           ServicePath='AutoComplete.asmx'           ServiceMethod='AutoComplete2'           MinimumPrefixLength='1'           CompletionSetCount='12'           TargetControlID='TextBox3'           EnableCaching='True' >      </cc2:AutoCompleteExtender>  <asp:TextBox ID='TextBox3' runat='server'></asp:TextBox> 

AutoComplete.asmx:

<%@ WebService Language='C#' CodeBehind='~/App_Code/AutoComplete.cs' Class='AutoComplete' %> 

AutoComplete.cs:

using System; using System.Web; using System.Collections; using System.Web.Services; using System.Web.Script.Services; using System.Web.Services.Protocols; using System.Collections.Generic; using System.Data.SqlClient; using System.Configuration; using System.Data;   /// <summary> /// Summary description for AutoComplete /// </summary> [WebService(Namespace = 'http://tempuri.org/')] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ScriptService] public class AutoComplete : System.Web.Services.WebService {      public AutoComplete () {          //Uncomment the following line if using designed components          //InitializeComponent();      }      [WebMethod]     [ScriptMethod]     public string[] AutoComplete2(string prefixText,int count)     {         string conString = ConfigurationManager.ConnectionStrings['DB'].ConnectionString;         SqlConnection connection = new SqlConnection(conString);         connection.Open();         SqlParameter prm;         string sql = 'Select program_name FROM CM_Programs WHERE program_name LIKE @prefixText';         SqlDataAdapter cmd = new SqlDataAdapter(sql, connection);         prm = new SqlParameter('@prefixText', SqlDbType.VarChar, 50);         prm.Value = prefixText+ '%';         cmd.SelectCommand.Parameters.Add(prm);         DataTable dt = new DataTable();         cmd.Fill(dt);         string[] items = new string[dt.Rows.Count];         int i = 0;         foreach (DataRow dr in dt.Rows)         {             items.SetValue(dr['program_name'].ToString(),i);             i++;         }         connection.Close();         return items;     }  } 
  • 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. 2026-05-11T13:50:26+00:00Added an answer on May 11, 2026 at 1:50 pm

    ‘Nothing happens’ is not an easy description to go on. When you say nothing happens, have you checked that

    • The server code is being hit for the web service?
    • Your query is being executed and returning results?
    • Your items array is being populated correctly?

    If ‘nothing’ is that none of the above is happening, I would start checking that there are no javascript errors on the page and that your AutoComplete extender is rendering correctly (examine the page controls in a trace).

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

Sidebar

Ask A Question

Stats

  • Questions 123k
  • Answers 123k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer All the fun stuff happens in this line: IL_0014: callvirt… May 12, 2026 at 1:03 am
  • Editorial Team
    Editorial Team added an answer Both ways look like they would consume roughly similar space… May 12, 2026 at 1:03 am
  • Editorial Team
    Editorial Team added an answer First of all, you should never use backticks unless you… May 12, 2026 at 1:03 am

Related Questions

I am using C# .Net 2.0 to write a webservices client. The server's soap
How can I configure a .NET solution (C#, .NET 2.0) to to allow other
I currently have a class and I'm trying to create an easy GUI to
This might seem like a noddy question, but I was looking at this because

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.