asp.net mvc - How to get route name from Attribute routing in ASP MVC5 -



asp.net mvc - How to get route name from Attribute routing in ASP MVC5 -

does know how route name attribute routing in action filter?

for illustration have controller , attribute route this:

[httpget] [customactionattribute] [route("~/index", name="indexpage")] public async task<actionresult> index() { //controller logic }

is possible route name in customactionattribute?

public override void onactionexecuting(actionexecutingcontext filtercontext) { //get current route name here }

you can extend routecollection accomplish this. can find illustration code here

asp.net-mvc routes asp.net-mvc-5 attributerouting

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -