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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:07:58+00:00 2026-05-28T11:07:58+00:00

I am trying to use jQuery autocomplete on my dynamically created textboxes. this is

  • 0

I am trying to use jQuery autocomplete on my dynamically created textboxes. this is my first time working with jQuery so I am not so sure about where I am getting off…
My ASMX page code is working fine & generating result as asked but my javascript of
autocomplete is not calling the page at all (tried in debug) and its not giving me error
message either… Help Please!!

EDIT :
I am still having error “ASP.NET Ajax client-side framework failed to load.”

<script src="/ScriptResource.axd?d=dRAn80ZulnXIbHUFZAi0thqEaFFdeMlwAh6uA_ciIINTs7jTUe13ADvaDyjOl6tPSr-1TN4Bqt6MFVjznyiXABGNxDhFk5_-02EGxOku0B-Tim4ebG59zhvC6DdsHV11uoIY024U1o0IMngrTBO45x9tPeG-PiyEUPEypUFf795T-3SY0&amp;t=ffffffffb868b5f4" type="text/javascript"></script>
<script type="text/javascript">
<!--
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.'); 

Upon typing in the textbox, I get the pop up error :

Ajax error: researcher_list.asmx/FetchResList : error : undefined : Internal Server Error : 500

EDITED CODE :

Aspx Code :

$(function() {
    $('input:text').autocomplete({
        source: function(request, response) {
            var pString = '{ "resName": "' + request.term + '" }';
            $.ajax({
                url: "researcher_list.asmx/FetchResList", /* same root as the page? */
                data: pString,
                dataType: "jsond",
                type: "POST",
                contentType: "application/json", /* simplify */
                converters: {/* avoid the d or no d issue, works with 3.5 or prior this way */
                    "json jsond": function(msg) {
                        return msg.hasOwnProperty('d') ? msg.d : msg;
                    }
                },
                success: function(data) {/* assumes data always returned and it IS called item in the JSON */
                    response($.map(data, function(item) {
                        return {
                            value: item.name,
                            label: item.name
                        }
                    }))
                },
                error: function(xhr, textStatus, errorThrown) {
                    var errorMessage = "Ajax error: " + this.url + " : " + textStatus + " : " + errorThrown + " : " + xhr.statusText + " : " + xhr.status;

                    if (xhr.status != "0" || errorThrown != "abort") {
                        alert(errorMessage);
                    }
                }
            });
        },
        minLength: 2
    });
});

Asmx Code :

[WebService(Namespace = "http://localhost/v2/pages/main.aspx")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// 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 researcher_list : System.Web.Services.WebService
{
    [WebMethod]
    public List<DBResearcher.Summary> FetchResList(string resName)
    {
        //SqlConnection connection;
        //SqlCommand command = null;
        //SqlDataReader myReader = null;
        //string sql;
        //StringBuilder sb = new StringBuilder();
        var tempSum = new DBResearcher();
        var allRes = DBResearcher.GetAllResearcher()
                        .Where(m => m.name.ToLower().Contains(resName.ToLower()));
        return allRes.ToList();
    }

    public static string[] GetCustomerNames()
    {
        string[] data = new string[] { "Andrew", "Ramona", "Russ", "Russell",  Raymond" };

        return data;

    }
}

web.config file :

<httpHandlers>
  <!-- AJAX.Net Configuration -->
  <add verb="GET,POST" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax"/>
  <remove verb="*" path="*.asmx"/>
  <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpHandlers>

<!-- HTTP MODULES -->

 <httpModules>
  <!-- doesn't work if we restrict it by <location path=...> for some reason,
            so we have no choice but to do this at the root level. -->
  <!--<add name="HttpUploadModule" type="AssistedSolutions.SlickUpload.HttpUploadModule, AssistedSolutions.SlickUpload" />
    -->
  <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 </httpModules>

EDIT –
Error while running asmx page on its own

Stack Trace:

[HttpException (0x80004005): Failed to Execute URL.]
   System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6.BeginExecuteUrl(String url, String method, String childHeaders, Boolean sendHeaders, Boolean addUserIndo, IntPtr token, String name, String authType, Byte[] entity, AsyncCallback cb, Object state) +2008569
   System.Web.HttpResponse.BeginExecuteUrlForEntireResponse(String pathOverride, NameValueCollection requestHeaders, AsyncCallback cb, Object state) +393
   System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) +220
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8699714
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
  • 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-28T11:07:58+00:00Added an answer on May 28, 2026 at 11:07 am

    My answer is built based on an asp.net 3.5 solution and jQuery 1.7.1 version assumption. Much has been already covered by other posters. Yours may vary by version. This is simply an attempt to put comments in an answer with a completed script and server side notes.

    Have you decorated your class thus:

    [WebService(Namespace = "http://mysite.com/researcher_list/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    [ScriptService]
    public class researcher_list : WebService
    {
    

    Decorate your method: (use the EnableSession IF you need that…)

    [WebMethod(EnableSession = true)]
    public List<DBResearcher.Summary> FetchResList(string resName)        {  
    

    cleanup of the client script:

    $('input:text').autocomplete({
        source: function(request, response) {
            var pString = '{ "resName": "' + request.term + '" }';
            $.ajax({
                url: "researcher_list.asmx/FetchResList",
                /* same root as the page? */
                data: pString,
                dataType: "jsond",
                type: "POST",
                contentType: "application/json",
                /* simplify */
                converters: { /* avoid the d or no d issue, works with 3.5 or prior this way */
                    "json jsond": function(msg) {
                        return msg.hasOwnProperty('d') ? msg.d : msg;
                    }
                },
                success: function(data) { /* assumes data always returned and it IS called item in the JSON */
                    response($.map(data, function(item) {
                        return {
                            value: item.name,
                            label: item.name
                        };
                    }));
                },
                minLength: 2,
                error: function(xhr, textStatus, errorThrown) {
                    var errorMessage = "Ajax error: " + this.url + " : " + textStatus + " : " + errorThrown + " : " + xhr.statusText + " : " + xhr.status;
                    if (xhr.status != "0" || errorThrown != "abort") {
                        alert(errorMessage);
                    }
                }
            });
        }
    });
    

    IN ADDITION to the above, there are Web.config settings in asp.net that need set to get a web service to function – assumption here is you have done the research and have that working. IF NOT, suggestion is create a simple method that returns the current time as a string with NO parameters (data:”{}”,) and get that via ajax to ensure it works before the complexity of the autocomplete is layered.

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

Sidebar

Related Questions

I am trying to use autocomplete from http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js but am getting this error. textbox
I'm trying to use the autocomplete plugin for jQuery (this one http://docs.jquery.com/Plugins/Autocomplete ). My
I'm trying to use autocomplete inside of jquery mobile and it is working good
I am trying to use the jquery autocomplete plugin but am having trouble getting
I am trying to use jquery autocomplete plugin, I want it to suggest ItemCodes
I'm trying to use JQuery's autocomplete plug-in but for some reasons Internet Explorer is
im trying to use the jQuery UI autocomplete to communitate with a webservice with
I am trying to use JQuery in my ASP.Net 2.0 website in this scenario:
In my rails application I am trying to use rails3-jquery-autocomplete gem. I included the
I'm trying to use the official jQuery autocomplete plugin with an ASMX web service

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.