Created
September 18, 2012 09:38
-
-
Save SamWM/3742267 to your computer and use it in GitHub Desktop.
ASP.NET MVC: get action / controller name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string controllerName = ViewContext.RouteData.GetRequiredString("controller"); | |
string actionName = ViewContext.RouteData.GetRequiredString("action"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hello can i ask question
how can i get it but in arabic