Posted on

Today i was trying to convert ASP.NET MVC 2 master pages to ASP.NET MVC3 Razor master layout.chtml and hit following error trying to call

@Html.RenderAction(“Footer”, “Root”); which has been converted from <% Html.RenderAction(“Footer”, “Root”); %>.

To solve problem simply use @{Html.RenderAction(“Footer”, “Root”); }. It calls RenderAction and ignores return type.

@Html.RenderAction(“Footer”, “Root”); is trying to write output to stream and failing.