@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) -

xcode - Swift Playground - Files are not readable -

jboss7.x - JBoss AS 7.3 vs 7.4 and differences -