Basically, ajax
in aspx is polling the value return from .cs every 1000 ms from a WebMethod
in .cs which is static GetData()
. A property i
To reference a static
member, you must prefix the member with the name of the class that defines it.
However, don't do that!
Your static variable will be common to every user of your web service. You may think it would be one copy per session, but that's not the case. There will be one copy for all users of the same web service.