title: RenderPartial and ViewBag
body: <p>I'm trying to modify this code:
  <a href="http://www.codeproject.com/Articles/260470/PDF-reporting-using-ASP-NET-MVC3" rel="nofollow">http://www.codeproject.com/Articles/260470/PDF-reporting-using-ASP-NET-MVC3</a>
  To make it to get the ViewBag data for render the View in the PDF.</p>
  
  <p>Basically, I need to pass to Html.RenderPartial with a new Context my ViewBag, the code now is:</p>
  
  <pre><code>Html.RenderPartial(viewName, model);
  </code></pre>
  
  <p>And I'm trying to change it to something like:</p>
  
  <pre><code>Html.RenderPartial(viewName, model, new ViewDataDictionary(ViewBag));
  </code></pre>
  
  <p>I don't get any error but the Dictionary keeps empty.</p>
  
  <p>BR</p>