Click here to Skip to main content
15,905,587 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

when i am writing jquery in .ascx page, i don't find autocomplete in Intellisense.when I am writing myself, its thowing Exception. Below my code:


C#
$(document).ready(function () {

        $("#exampleAutoComplete_txtAutoComplete").autocomplete(function () {
            source: ["C++", "Java"];
        });


    });


here autocomplete hard coded. how can i resolve this issue. I search in google but i didn't get expected result.

Please help me.

Thanks
Shafik
Posted
Updated 14-Mar-13 9:30am
v3
Comments
Sergey Alexandrovich Kryukov 14-Mar-13 14:55pm    
Why do you worry about Intellisense so much? It is not really related to software development, is nothing more then some additional convenience. There are situations when Intellisense does not work, so what? Just write code correctly... Whatever we advise, you won't be able to improve the code of Visual Studio...
—SA
[no name] 14-Mar-13 15:10pm    
Thanks for reply, Sir I hard coded that but when i run i got this error: "Microsoft JScript runtime error: Object doesn't support this property or method". Can you please give me any solution
CHill60 14-Mar-13 15:16pm    
You don't appear to have spelled it correctly "autocomple" ?
[no name] 14-Mar-13 15:30pm    
Sorry I corrected that still its throwing same exception. any ways thanks for ur reply
ZurdoDev 14-Mar-13 15:35pm    
What autocomplete plugin are you using? If it is jquery ui then are you loading jquery ui? Also, intellisense won't pick up on the jquery functions like that.

All you need to do is download jquery and jqueryui files so that they are on your harddrive and included in your project instead of referencing them from a url.

http://jquery.com/download/[^]

http://jqueryui.com/resources/download/jquery-ui-1.10.1.custom.zip[^]

The autocomplete function is inside of jqueryui.
 
Share this answer
 
Comments
[no name] 14-Mar-13 19:02pm    
Good one. This is all you need to do.
XML
<script src="http://code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js" type="text/javascript"></script>


If i use above those Plugins then working fine. But i don't want use those i wanna use microsoft provided plugin what can i do. means i want to use default plugins which are in VS2010
 
Share this answer
 
Comments
ZurdoDev 14-Mar-13 16:00pm    
Those are just urls. Type them into your browser and download them as files. You need both jquery and jqueryui. Neither of them are microsoft.
[no name] 14-Mar-13 19:03pm    
If you want to use microsoft thing ... then use Ajax AutoCompleteExtender, why are you using jquery autocomplete ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900