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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:21:49+00:00 2026-06-03T04:21:49+00:00

I have a webpart which calls ASP.NET handler to accomplish the autocomplete functionality. ASHX

  • 0

I have a webpart which calls ASP.NET handler to accomplish the autocomplete functionality.

ASHX File
    <%@ WebHandler Language="C#" Class="MyService.MyAutoComplete" CodeBehind="MyAutoComplete.ashx.cs" %>

Code Behind File

namespace MyService
{
    /// <summary>
    /// Summary description for MyAutoComplete
    /// </summary>
    public class MyAutoComplete : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            var searchTerm = context.Request.QueryString["term"].ToString();

            context.Response.Clear();
            context.Response.ContentType = "application/json";


            var search = GetList();

            JavaScriptSerializer jsSerializer = new JavaScriptSerializer();
            string json = jsSerializer.Serialize(search);
            context.Response.Write(json);
            context.Response.End();
        }

    }
}

This is my JQuery call

$(function () {
            $("#<%= txtSearchInput.ClientID %>").autocomplete({
                source: "/_Layouts/My Service/MyAutoComplete.ashx",
                minLength: 2,
                select: function (event, ui) {
                    $(this).val(ui.item.value);
                }
            });
        });

The “My Service” is SharePoint layout folder inside the webpart project.

When I make call thro JQuery it throws the following error
“Could not create type ‘MyService.MyAutoComplete'”

Any help appreciated.

  • 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-06-03T04:21:50+00:00Added an answer on June 3, 2026 at 4:21 am

    It Seems SharePoint components have its own way of identifying the components :). After googling I found the following solution.

    <%@ WebHandler Language="C#"  Class="MyService.MyAutoComplete,MyProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=87c41094797c589e" %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a file called webpart.cs which is called by one of my masterpages
I have a webpart with asp.net control within. I would like to hide some
I have a custom search webpart in Sharepoint which have 7 filters. I am
I am newbie in SharePoint 2010 but have experience in ASP.NET (C#) development. I
I have developed a custom webpart which is being displayed correctly and has some
I want to have a webpart working when a file is open. I saw
I'm building a webpart for SharePoint 2010 in ASP.NET and I would like to
Within SharePoint... I can create web parts which are ASP.NET web apps, which allows
I have a webpart which uses SPGridView to render tabulated data. I need to
i have one Webpart which shows an image slider. The image slider will be

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.