title: asp.net mvc 1.0 - how to render a partial view as a string
body: <p>I need to render a <strong>partial</strong> view to a string within a controller action. I have the following sample code, but the ControllerContext.<strong>ParentActionViewContext</strong> does not seem to exist in mvc 1.0</p>
  
  <pre><code>            // Get the IView of the PartialView object.
              var view = PartialView("MyPartialView").View;
  
              // Initialize a StringWriter for rendering the output.
              var writer = new StringWriter();
  
              // Do the actual rendering.
              view.Render(ControllerContext.ParentActionViewContext, writer);
  </code></pre>
  
  <p>Any tips greatly appreciated.</p>