Figured out the answer to my own question. I thought I'd post it in case
anyone is interested...
1) Create a page with an IFrame on it. Set the src to a second page
2) On the second aspx page, remove all the html except the Page directive
(do remove the !doctype etc.)
3) In thepage load of the second page create a memory stream and an
XMLSerializer
4. Serialize your object to the memory stream. Then use ToArray() on the
memory stream to write the
serialized document to a byte array. Then use Encoding.ASCII.GetString to
write the byte array to a string, finally, use Response.Write to write the
string. This will be displayed in the IFrame on the first page.
Works great.
"Jesse Liberty" <jl******@libertyassociates.com> wrote in message
news:ue********************@speakeasy.net...
Hi.
I'd like to create an xml document on the fly and then display it in an
asp.net page. I can use an iframe and point to a URL (which displays
perfectly), but I'd not like to save the xml to a file (it will be built
as I go along).
I can use the <asp:xml> control, but I don't want to have to write the
XSLT, I love the one I get for free within IFrame.
Any suggestions?
Thanks.