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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:10:24+00:00 2026-05-15T04:10:24+00:00

I’m working on building an HTTPHandler that will serve up plain text for use

  • 0

I’m working on building an HTTPHandler that will serve up plain text for use with jQuery Autocomplete. I have it working now except for when I insert the first bit of text it does not take me to the right portion of the alphabet.

Example: If I enter Ne

my drop down returns

Nlabama
Arkansas

Notice the “N” from Ne and the “labama” from “Alabama”

As I type the third character New, then the jQuery returns the “N” section of the results.

My current code looks like this

Public Sub ProcessRequest(ByVal context As System.Web.HttpContext) Implements System.Web.IHttpHandler.ProcessRequest
    ''# the page ContentType is plain text
    HttpContext.Current.Response.ContentType = "text/plain"

    ''# store the querystring as a variable'
    Dim qs As Nullable(Of Integer) = Integer.TryParse(HttpContext.Current.Request.QueryString("ID"), Nothing)

    ''# use the RegionsDataContext'
    Using RegionDC As New DAL.RegionsDataContext

        ''# create a (q)uery variable'
        Dim q As Object

        ''# if the querystring PID is not blank'
        ''# then we want to return results based on  the PID'
        If Not qs Is Nothing Then
            ''# that fit within the Parent ID'
            q = (From r In RegionDC.bt_Regions _
                    Where r.PID = qs _
                   Select r.Region).ToArray

            ''# now we loop through the array'
            ''# and write out the ressults'
            For Each item In q
                HttpContext.Current.Response.Write(item & vbCrLf)
            Next

        End If


    End Using
End Sub

So where I’m at now is the fact that I stumbled on the “Part” portion of the Autocomplete method whereby I should only return information that is contained within the Part.

My question is, how would I implement this concept into my HTTPHandler without doing a fresh SQLQuery on every character change? IE: I do the SQL Query on the QueryString(“ID”), and then on every subsequent load of the same ID, we just filter down the “Part”.

http://www.example.com/ReturnRegions.axd?ID=%5BsomeID%5D&Part=%5Bstring%5D

  • 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-15T04:10:25+00:00Added an answer on May 15, 2026 at 4:10 am

    I changed my jQuery library to use the jQuery-UI and then built my iHttpHandler using a Singleton object in order to avoid hitting the database on every page load. The answer here seems to be working well for me.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I need a function that will clean a strings' special characters. I do NOT
I have a reasonable size flat file database of text documents mostly saved in
I have a bunch of posts stored in text files formatted in yaml/textile (from

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.