Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6766459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:50:00+00:00 2026-05-26T14:50:00+00:00

I had a problem (which is now fixed) but I’ve no idea why… I

  • 0

I had a problem (which is now fixed) but I’ve no idea why…

I have an Ajax AutoCompleteExtender with a WebService method to populate like

<WebMethod()> _
Public Shared Function populateACE(prefixText As String) As List(Of String)

However this didn’t work – I put a breakpoint in, and it didn’t even get hit. However…

<WebMethod()> _
Public Function populateACE(prefixText As String) As List(Of String)

..does work (the only difference being not Shared).

Fair enough, but why? If you have an instance of a class then you can access Shared methods of it; if you don’t have an instance of a class then you can access Shared methods of it. So what is going on behind the scenes?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:50:01+00:00Added an answer on May 26, 2026 at 2:50 pm

    If you’re calling a page method then it must be Shared/static. But when calling methods attached to asmx services, accordining to John Saunders in this question,
    Why are Static Methods not Usable as Web Service Operations in ASMX Web Services?, web methods can’t be Shared/static by design.

    I’d have to guess that both are design limitations in the pipelines that retrieve pages vs. web methods.

    To quote the relevant part from John Saunders’ answer..

    The answer is: because you can’t.

    It’s not designed that way. The design is that an instance of the web
    service class will be created, and then an instance method will be
    called.

    ..but still worth having a look at the full answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not too long ago, I had a problem which required me to set WinDbg.exe
I had a problem in site map path I had navigation bar which take
We had huge performance problem when deploying our ASP.NET app at a customer, which
One thing with which I have long had problems, within the CakePHP framework, is
Thanks everybody for the reply! Now I fixed the problem by R 2.12.1 and
Original question is below. I fixed my problem. I had the same view controller
I am using ajax toolkit asyncFileUpload control I had problem that my server side
I had a problem that was partially solved. To explain it quickly : I
I had a problem with committing changes after merging two branches of my project
I had this problem before and can't for life of me remember how to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.