I need to display an ASP.NET MVC view for a string in order to be able to send it by email (this is an order confirmation email defined in the .ascx file).
I was able to successfully convert ASP.NET MVC View to a string using one of the methods in this question.
However, now I need to be able to do this through the WCF service (which will be accessed through silverlight), and therefore I do not have a ControllerContext. This WCF service is contained in the same project as my MVC project, and has access to all my models, etc.
I reviewed a few Stackoverflow questions about this issue, but they all seem to need a controller context. I thought there was something in mvccontrib, but it seems like it is not.
The closest I found is the accepted answer to the above question, but it unfortunately breaks with RenderPartial in the view you are viewing.
I hope some of the header work for ASP.NET MVC 2 related to RenderAction can help make this possible now?
source
share