Let me rephrase the question, I think I was not being clear.
Say I want to return an XML stream(strings of XML data) which one
should I use.
I have seen a lot of scenarios where .asmx service returns a customized
xml string not just object's XML (Business needs)
Thanks
RK
It's not really a matter of which one to use for returning XML, that's not
the point. They both can return XML.
It's a matter of how you want to ask for that XML string in the first place.
.aspx pages can take an input argument that is passed to it via a
querystring or form submission and return some XML as its response, or it
can just return some XML as its response without you passing anything to it
at all. But, when you work this way, you are not using a formalized
Object-Oriented way or standardized XML way of asking for and receiving your
XML.
But, web services (.asmx) files are OBJECTS that expose functions via the
web. If you wish to be able to remotely instantiate one of these objects so
that you can call one of its functions, you need a web service (.asmx file).
This is a much more OO way of doing things as well as following XML
standards. Not to mention, that web services offer other benefits that
simple web pages don't like the ability to query a server to see what
services it offers and a more robust form of securing your services.
Both require processing on the server and both will return XML. Speed isn't
really going to be much of a factor if you are talkng about returning the
same XML (more or less) in each case.
> Let me rephrase the question, I think I was not being clear.
>
[quoted text clipped - 6 lines]
> Thanks
> RK