Jquery Auto Complete in asp.net
<p>i want to use jquery ui auto complete plugin in asp.net.
this is my behind code :</p>

<pre><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(",'" &amp; item &amp; "'")
        End With
    Next
    If (myResult.Length &gt; 0) Then
        Return myResult.ToString().Substring(1)
    Else
        Return ""
    End If
End Function
</code></pre>

<p>this is html code :</p>

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

&lt;label for="tags"&gt;Tags: &lt;/label&gt;
&lt;input id="tags" /&gt;
</code></pre>

<p>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.</p>
