that would depend on how you are feeding the xml string to the page. if you are using an implementation of IHttpHandler or a generic handler (ashx) you would want to set the contenttype of the response to "text/xml".
if you are using a webform then you could try to Html.Encode() the string before rendering, although this may effect formatting and characters.
if you are just displaying xml without any other elements on the page I would use a generic handler (ashx) rather than a webform (aspx). you don't need the entire page life cycle to render text.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.