I'm wondering why the NameService.HelloWorld() method, which is defined with only one parameter ("yourName") doesn't throw an exception when it is called with two (or possibly three) parameters from the client-side Javascript HelloWorld() function (ch. 10, p. 356).
So the method's return "success callback" calls the second parameter named
JS function and if there's an error the third parameter (if there is one) gets called. This is evidently special behavior caused by the preceding of the HelloWorld method with the [WebMethod] attribute. Yes?
I would have expected to see NameService.HelloWorld() as an overloaded method, accepting two or three parameters. Alternately, I would have expected the call to the service to have been done something like
<code>var result = NameService.HelloWorld(yourName);</code>
Then one would process "result", etc.
Please comment or elaborate. Thanks. (Great book, by the way.)