Re: AJAX - AutoCompleteExtender ASP.Net 2.0 (Page Method vs. Web Servi



Hello,

you'll have to specify the [ScriptMethod] attribute in addition to the [WebService] attribute.

Best regards,
Henning Krause

"Trent" <Trent@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:707AF9A7-9364-4976-9BD2-75312B84C1D0@xxxxxxxxxxxxxxxx
I have tied an AutoCompleteExtender to a textbox to indicate suggestions to
the user. Everything works fine if I utilize a webservice to fetch the
results. However, I want to put the web service code into a page method. I
have run the debugger only to find that the [WebMethod] is never entered.
Here are some of the things I have already tried with no success. It appears
that this is a common problem.

-Added the [WebMethod] attribute to the top of the code-behind method.
-Added/removed "Static" as part of the public method definition.
-Removed the "ServicePath" attribute from the AutoCompleteExtender .aspx page.

My textbox and extender control are embedded into a user control(.ascx) that
is placed within a ContentPanel inherited from a MasterPage. I'm not sure if
this could be part of the problem. As I view the browser source code, the
javascript renders the "ServicePath" to be looking by default at my aspx
page, but my [WebMethod] lives in pagename.ascx.cs. Also, I have tried
including "ServicePath=pagename.ascx.cs" and still no luck.

At this point, I don't know what else to try. The main reason I'm wanting
to move to a page method is because I need access to controls which aren't
available to the web service. Also, I don't think my needs here constitute
the need for a web service.

Any help would be greatly appreciated!

Thanks,

Trent

.



Relevant Pages

  • Re: WinForms and WebServices
    ... The OP wants to create a WebService and a WebForms application to ... who will install the WebService on their Web servers. ... When that is installed your program can reference to that. ... So you say that I can change the web service URL in the config file at run ...
    (microsoft.public.dotnet.languages.vb)
  • Re: WinForms and WebServices
    ... The OP wants to create a WebService and a WebForms application to ... who will install the WebService on their Web servers. ... When that is installed your program can reference to that. ... So you say that I can change the web service URL in the config file at run ...
    (microsoft.public.dotnet.languages.vb)
  • Re: DateTime WebService Discrepancy.
    ... When the datetime is sent by the webservice, ... > Ofcourse I had not even though of just passing a string as a parameter ... > locally and cut out the call to the web service. ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: Possible to consume a web service with VB.NET 1.1 VS 2003?
    ... webservice is aiming at interop between heterogenious platforms. ... Microsoft MSDN Online Support Lead ... Possible to consume a web service with VB.NET 1.1 VS 2003? ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: How do I create an object?
    ... The webservice exposes a WSDL document for that vary purpose. ... >I have the almost the same question, but it's regarding a web service ... It has a method such as SetInfo(int age, string firstName, ...
    (microsoft.public.dotnet.framework)

Loading