Reputation: 73
So I want to put a list of newsitems in _Layout.cshtml
I have a News model and a Show Action in its controller, and I want to put it in there with a RenderAction.
@Html.RenderAction("Show","News");
Does not seem to work. But http://localhost:49295/News/Show/ does work I should be using renderaction right?
EDIT
@{Html.RenderAction("Show","News");}
stackoverflowerror, probably because I just put an action that uses the layout, in the layout itself? How do I not use the default layout for this view?
Upvotes: 1
Views: 1981