ASP.NET MVC XML Action Result

For my Location Service in F# I needed a way to be able to return XML from MVC (which powers my site), but I couldn’t find a way to do this out of the box with XML.
Luckily creating your very own ActionResult is really quite easy in MVC.
First yo…


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail

For my Location Service in F# I needed a way to be able to return XML from MVC (which powers my site), but I couldn’t find a way to do this out of the box with XML. Luckily creating your very own ActionResult is really quite easy in MVC. First you need to implement the ActionResult class: public class XmlActionResult : ActionResult { public override void ExecuteResult(ControllerContext context) { } } I’m going to add a couple of public properties:


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail


Print Share Comment Cite Upload Translate Updates
APA

Posts on LINQ to Fail | Sciencx (2010-06-16T00:00:00+00:00) ASP.NET MVC XML Action Result. Retrieved from https://www.scien.cx/2010/06/16/asp-net-mvc-xml-action-result/

MLA
" » ASP.NET MVC XML Action Result." Posts on LINQ to Fail | Sciencx - Wednesday June 16, 2010, https://www.scien.cx/2010/06/16/asp-net-mvc-xml-action-result/
HARVARD
Posts on LINQ to Fail | Sciencx Wednesday June 16, 2010 » ASP.NET MVC XML Action Result., viewed ,<https://www.scien.cx/2010/06/16/asp-net-mvc-xml-action-result/>
VANCOUVER
Posts on LINQ to Fail | Sciencx - » ASP.NET MVC XML Action Result. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2010/06/16/asp-net-mvc-xml-action-result/
CHICAGO
" » ASP.NET MVC XML Action Result." Posts on LINQ to Fail | Sciencx - Accessed . https://www.scien.cx/2010/06/16/asp-net-mvc-xml-action-result/
IEEE
" » ASP.NET MVC XML Action Result." Posts on LINQ to Fail | Sciencx [Online]. Available: https://www.scien.cx/2010/06/16/asp-net-mvc-xml-action-result/. [Accessed: ]
rf:citation
» ASP.NET MVC XML Action Result | Posts on LINQ to Fail | Sciencx | https://www.scien.cx/2010/06/16/asp-net-mvc-xml-action-result/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.