Fergers
Fergers

Reputation: 583

XmlDocument object to view asp.net

I just started programming in visual studio Mvc3 for a scoolproject but i cant find a way to give the output of my xml by passing in from the controller to a view.

I made a XmlDocument object and i actually have no idea how to show this. What do i have to return in my controller? one important thing is that i dont want to save the xml files i generate and wanna show.

Any suggestions?

Upvotes: 1

Views: 550

Answers (1)

detaylor
detaylor

Reputation: 7280

Look at How to return an XML string as an action result in MVC. You should be able to get a string representation of your XmlDocument using ToString() or OuterXml

Upvotes: 1

Related Questions