2

I am new to ASP.net & Jquery.I am trying to implement autocomplete in my application using Jquery.I have downloaded Jquery plugin from this site.I am referring to this method.Please refer my code block-

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

Part of my controller code is ==>

    public String Result;
    Result = SourceSerializer.Serialize(ResultList);

ResultList is list of tags. I have also tried using hidden input as-

    <input type = "hidden" id = "myid" name = "Name" />

Then in Jquery-

    <script type = "text/javascript">
    $(function () {
        var availableTags = document.getElementById('myid).value;
        $("#tags").autocomplete({
            source: availableTags
        });

But both methods are not working for me. If there is any other way please tell me.Also if you know better place to learn Jquery and ASP.net please redirect me to it.

2
  • Doont forget to mark it as accpeted if you got the info you wnat.. Commented Jun 22, 2012 at 7:33
  • dont forget to mark it as accepted if u got the info you want.. Commented Jun 22, 2012 at 10:47

1 Answer 1

1

See "3 Different Approaches for Implementing the JQuery Autocomplete with ASP.NET" for a good example of auto complete.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.