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?