This post is the best one so far to explain when to use RenderAction and when to use RenderPartial.
RenderAction basically can be a good place holder for some static contents that can be defined in _layout page. However, if the content is driven by main view content, it will be better define it in section area. There is a good tutorial by ScottGu.
Also in the view if you want to get the current action and controller, you can get it from ViewContext.RouteData.Values["controller" or "action"]
No comments:
Post a Comment