@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++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -