Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to display XML as is in asp.net page

Status
Not open for further replies.

jrenae

Programmer
Jan 18, 2006
142
US
Hello,

I'm using the sql server XML DataType and I would like to be able to display the straight xml to my in-house users.

I tried using the asp:xml control but all I see is are the values of the nodes.

I tried using the asp:XmlDataSource control with a treeview, but all I see are the node names themselves but no values.

This seems like it should be simple to display the nodes and their values without using an xslt file by using one of these controls.

What am I missing?

Thanks

 
use a GenericHandler (ashx) instead of an webform (aspx)
run the query against the db. write the xml value to the Response.Stream. you might need to add a response header to explicitly state it's xml (opposed to html). there are example s on the web of how to do this.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top