I know that in asp.net-core 2.2, I can get the action name as follows:
ControllerContext.ActionDescriptor.ActionName
but I am looking for a way to get the controller name of the current request/page in asp.net-core 2.2
I will appreciate any guide.
Thank you
You have access to controller name in the
ControllerContext.ActionDescriptor.ControllerName
property, given that the action descriptor is of ControllerActionDescriptor
type