views:

500

answers:

1

I have an asp.net user control on which I want to use jquery ajax. It's basically a pop-up form which allows users to enter a name on an auto-complete control. I don't know how to make this happen using jquery ajax, because in the ajax jquery call i'm supposed to put in a page name in the url: section, and then the method to call. However, I want to put the method in the .cs file of the user control. Is there a way to make it happen, or do I have to create a page just to hold the ajax methods?

+1  A: 

A user control is different from a page, so you can't call it from your jquery. If you're using Asp.Net AJAX you can put the method in a page method. Otherwise you should put it in a webservice.

Chad
I think he'll definitely want to use a webservice
Nick
ah thanks guys! I totally forgot about the webservice.