Q:

Call web service in asp.net inline code block

Is it possible to call a web service from an inline code block in ASP.NET without adding a web reference?  If so, can you provide instructions?

A:

Add a web reference in a another C# project (e.g. console application). Then switch to "show all files". You'll find a hidden .cs file that contains the actual web service proxy that was created for you. (There's also a commandline tool that does the same thing, but I forgot the name)
You can copy the generated class to your .aspx into a <script runat="server"> block.
Although I don't know what you would actually need that for ;) Don't you have access to the source code of the web app?
Another solution is to create a .NET dll for the web proxy, then load this assembly dynamically using Assembly.Load(). Invoking methods dynamically is not pretty though.

