I am trying to call the RenderAction Extension Method within my own Html Helper:
System.Web.Mvc.Html.ChildActionExtensions.RenderAction(helper, "account", "login");
this is so that along with some additional logic, I would like all html helpers to use a common method name structure when calling it on the view:
<%= Html.CompanyNam开发者_如何学Goe().RenderAccount() %>
but the problem I am having is that, asp.net will complain about not finding the actual route it needs to process. It does not take in the parameters of "controller" to be used as the action and "login" to be used as the action. It seems to only reference the current route.
Any ideas how I can package up the RenderAction?
Sorry all, I made a mistake:
It should have been:
System.Web.Mvc.Html.ChildActionExtensions.RenderAction(helper, "register", "account");
This is now resolved.
精彩评论