Using System;
Using System. The Web;
Using System. Web. Services;
Using System. Web. Services. Separate Protocols;
Using System. Web. Script. Services;
Using System. Collections. Generic;
[WebService (Namespace="http://tempuri.org/")]
[WebServiceBinding (ConformsTo=WsiProfiles. BasicProfile1_1)]
[ScriptService]
Public class QuotationService: System. Web. Services. WebService
{
[the WebMethod]
Public string GetQuote ()
{
List
Quotes. The Add (" The fool who is silent passes for wise. ");
Quotes. The Add (" The early bird catches The worm. ");
Quotes. The Add (" If wishes were true, shepherds whenever Kings. ");
The Random RND=new Random ();
Return quotes [RND. Next (quotes. Count)];
}
}
PTG
Calling Web Services from the Client 1779
40
})
});
});
</script>
<body>