@Html.Action in Asp.Net Core -
where @html.action
in mvc6? can see @html.actionlink
not direct call action before.
was replaced viewcomponents?
for net core 2.0
using microsoft.aspnetcore.mvc.infrastructure;
replace
// var actionselector = getserviceorfail<iactionselectordecisiontreeprovider>(currenthttpcontext); var actionselector = getserviceorfail<iactiondescriptorcollectionprovider>(currenthttpcontext);
and
// var actiondescriptor = actionselector.decisiontree.select(routevalues).first(); var actiondescriptor = actionselector.actiondescriptors.items.where(i => i.routevalues["controller"] == controller && i.routevalues["action"] == action).first();
Comments
Post a Comment