Today I transferred a fairly new project from ViewPages to Razor, and everything seems to be going well. Also, I'm trying to use Html.Action to render a user control and will not do anything.
So, I have a Shared / _Layout.cshtml file referenced in Home / Index.cshtml
Index.cshtml has the following:
<article> @Html.Action("LatestBlogsMainPanelWidget", "Blogs") ... </article>
I put traps in BlogController, so I know that I'm being asked. I also know that the model returns that there is a view mechanism in the RecentBlogsMainPanelWidget file, and even some dummy Razor syntax code is executed: @ {var s = "hello"; }
but the simple html in this file does not get into the browser. I also tried other (previously working) partial ones, and they will not appear either (viewing the source on the page confirms this is not there).
I also tried replacing @ {Html.RenderAction (...); } unsuccessfully. HTML on both sides of @ Html.Action appears, so I know that Index.cshtml is displayed correctly.
Even stranger, the _Layout file also contains Html.Action commands, and they do look great.
I'm really not sure what else to check, or how to confirm that the pipeline is receiving HTML. Can anyone help at all?
Thanks!
asp.net-mvc-3 razor renderaction partials
Steve owen
source share