0

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?

chobo2
  • 83,322
  • 195
  • 530
  • 832
  • possible duplicate of [Render a view as a string](http://stackoverflow.com/questions/483091/render-a-view-as-a-string) – CRABOLO Jun 14 '14 at 02:36

1 Answers1

2

Take a look at the earlier stackflow thread at Render a view as a string

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.

Community
  • 1
  • 1
Rasik Jain
  • 1,026
  • 6
  • 14
  • It works with default view engine and others, but when you use other, it can be done easier. – LukLed Nov 08 '09 at 19:43