tags:

views:

75

answers:

1

Hi

I am wondering is there a way to render a partial view in the controller. So like you have a partial view and instead of returning it you render it right there in that controller method and store the result into a string or something like that?

+2  A: 

Take a look at the earlier stackflow thread at http://stackoverflow.com/questions/483091/render-a-view-as-a-string/1241257#1241257

Also, http://www.klopfenstein.net/lorenz.aspx/render-partial-view-to-string-in-asp-net-mvc

I haven't tried it personally though... good luck.

Rasik Jain
It works with default view engine and others, but when you use other, it can be done easier.
LukLed