Displaying XML

  • Thread starter Carole MacDonald
  • Start date
C

Carole MacDonald

There have been lots of posts on this topic, but I haven't been able
to apply any of the suggestions to my situation.

I have an .aspx page with a form on it that has several submit buttons
on it. Clicking a button will cause a web service action that returns
XML. I would like to display this XML response on the page with the
form. I know I can display XML in an IFRAME by pointing its source to
an XML file. But I'm streaming the XML dynamically. I also saw a
suggestion to have the IFRAME's src point to the aspx page that loads
the XML. Again, that won't work because I'm displaying the response
to a form action in the IFRAME.

If someone could give me an example or pointers to displaying XML in
an IFRAME (or any other way) on a page with a form in response to a
form action, I would appreciate it. BTW, when I say "displaying XML",
I mean having IE render it the same as if you open an XML file
directly in IE.

Thanks,
Carole
 
K

Kevin Spencer

I also saw a
suggestion to have the IFRAME's src point to the aspx page that loads
the XML. Again, that won't work because I'm displaying the response
to a form action in the IFRAME.

Actually, that will work, as long as you set the Response.ContentType of the
ASPX page to "text/xml". Because the file requested has an .aspx extension,
you must inform the browser that it is not HTML, but XML.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,162
Latest member
GertrudeMa
Top