Click here to Skip to main content
15,616,138 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am calling code behind PageMethod, WebServices services to consume data using the ajax() function. When there is a necessity to consume data from code behind of the .aspx.cs page we declare some static function and then we consume this function using the ajax() function.[^]

1 solution

Why not asking the author of this code? No one else can be help responsible for a solution in someone else's code.

The first thing which comes to my mind would be: due to the sloppiness of the developer. I see no reasons why such method should be static. Please see:[^].

Some disclaimer: when I say "first thing which comes to my mind", I mean it. I cannot claim the code is really sloppy. This is just seems to be a generally bad sign to me, but the author could have a good reason. My main point is: it's a wrong idea to ask some strangers to explain the code they did not write. Instead, please learn the topic properly using the documentation I referenced.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900