The text of this article is not in this database — only its details are. Read it on the old site: Static WebMethod in Code Behind WebForm
3 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
The text of this article is not in this database — only its details are. Read it on the old site: Static WebMethod in Code Behind WebForm
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
sardar kamblePosted Jul 18, 2018, 9:02 AM
Nice articles
Viraj ShauPosted Sep 22, 2014, 12:59 AM
why we wrote static keyword without static keyword can't do wrote
Sam HobbsPosted Dec 17, 2013, 1:22 AM
I am sorry that I am unfamiliar with most of this but I assume that the GetData method is being called by JavaScript. If it is then that is why it must be static. The only real difference between a static function and other functions is that static functions are not called with a "this" pointer. JavaScript is unable to call functions and provide a "this" pointer because JavaScript is not C# and is unable to do anything with C# "this" pointers. I hope you understand. Or maybe I totally misunderstand what is happening here.