How to return an XML string as an action result in MVC [duplicate] April 10, 2023 by Tarik You could use return this.Content(xmlString, "text/xml"); to return a built XML string from an action.