trying to use ajax in asp.net but this simple example is not working.

I saw this example and i tried it but is not very working.
http://www.aspdotnet-suresh.com/2012/03/jquery-ui-autocomplete-textbox-with.html

select DISTINCT Name from PersonInfo where Name LIKE '%a%'  - I tested the query, it works fine but the autocomplete example is not working.
Autocomplete.aspx
Autocomplete.aspx.cs
goodkAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alexandre SimõesManager / Technology SpecialistCommented:
Did you inspect the response with FireBug to see the contents of data and data.d?
0
goodkAuthor Commented:
Alexcode, you think my code is correct?  I do not know what is a firebug? I am using asp.net
0
Alexandre SimõesManager / Technology SpecialistCommented:
FireBug is a MUST HAVE plugin for FireFox browser that helps a lot at, among other things, inspecting ajax requests: https://getfirebug.com/

As for your code it looks good but just by reading it I might be missing something.

You should:
- put a breakpoing on the webmethod to make sure it's returning something.
- use firebug to see the response content

I think the failure is in one of these...
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

goodkAuthor Commented:
url: "Default.aspx/GetAutoCompleteData",

What is this suppose to be?
0
Alexandre SimõesManager / Technology SpecialistCommented:
If you request that directly do you get the data you're expecting?

I mean, put that full url directly on the browser and see what comes back in the response.
ex: http://localhost:0000/Default.aspx/GetAutoCompleteData
0
goodkAuthor Commented:
I am confuse because my file name is autocomplete.aspx.  Am I suppose to create some more files?
0
Alexandre SimõesManager / Technology SpecialistCommented:
AH! Damn, no... Sorry...

It the file that have the webmethod is called autocomplete.aspx then that's the name you have to use:

url: "autocomplete.aspx/GetAutoCompleteData"
0
goodkAuthor Commented:
what is GetAutoCompleteData
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Alexandre SimõesManager / Technology SpecialistCommented:
It's the public method inside that page that has the WebAttribute
0
goodkAuthor Commented:
I get response "error".  Not sure what is wrong.  I am attaching the two files again.  Please see if you see something I am overlooking.

This is my first try at this so not very confident.
Autocomplete.aspx
Autocomplete.aspx.cs
0
goodkAuthor Commented:
Please give all the points to AlexCode - thanks
0
goodkAuthor Commented:
Thank you I got it to work.  I had a problem in the connection to the DB
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.