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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:06:40+00:00 2026-05-16T04:06:40+00:00

i want to use jquery ui auto complete plugin in asp.net. this is my

  • 0

i want to use jquery ui auto complete plugin in asp.net.
this is my behind code :

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim locations As String() = New String() {"Las Vegas", "Los Angeles", "Tampa", "New York", "s", "sss"}
    Dim jsArray As String = GetJSArrayForVBArray(locations)
    Me.ClientScript.RegisterArrayDeclaration("usernames", jsArray)
End Sub
Private Function GetJSArrayForVBArray(ByVal vbArray As String()) As String
    Dim myResult As New StringBuilder()
    For Each item As String In vbArray
        With myResult
            .Append(",'" & item & "'")
        End With
    Next
    If (myResult.Length > 0) Then
        Return myResult.ToString().Substring(1)
    Else
        Return ""
    End If
End Function

this is html code :

 <script type="text/javascript">
    $(function () {
        var availableTags = new Array();
        $("#tags").autocomplete({
            source: availableTags
        });
    });
</script>

<label for="tags">Tags: </label>
<input id="tags" />

what is the problem?
it does not work.
when i filling array in aspx page it works but when i want to fill in behind code not.
thanks.

  • 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-16T04:06:41+00:00Added an answer on May 16, 2026 at 4:06 am

    Try changing your JS to this:

    <script type="text/javascript">
    $(function () {
        $("#tags").autocomplete({
            source: usernames
        });
    });
    </script>
    

    If I’m guessing at your .Net code correctly, you’re registering “usernames” as the javascript array, but trying to use the empty ‘availableTags’ as your autocomplete source.

    Note: this may be completely off-base here – I haven’t actually used ClientScript.RegisterArrayDeclaration or the jQuery autocomplete plugin in code I’ve written before.

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

Sidebar

Related Questions

I want to use jquery Chili plugin for syntax highlighting a piece of code
so I want to use this JQuery plugin that Stack Overflow has made available
I am using jQuery auto-complete. I have download this script from http://code.google.com/p/jquery-autocomplete/ . I
So I want to use this plugin http://docs.jquery.com/Plugins/autocomplete I want to retrieve all the
I am trying to use jquery autocomplete plugin, I want it to suggest ItemCodes
I want to use autocomplete for jQuery in Eclipse. The Aptana Plugin is installed:
I want to use autocomplete (jquery or .net) with force a choice so that
Hey guys i want to use the jquery Autocomplete plugin and instead of separating
I want to use the jquery ui autocomplete plugin with 2 controls, so I
i have i page where i use autocomplete jquery plugin. this might filter 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.