@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

Popular posts from this blog

c - CUDA code not processing if block properly -

oracle11g - get root domain from url Oracle sql regex_substr -

xcode - Swift Playground - Files are not readable -