Skip to content

Instantly share code, notes, and snippets.

@SamWM
Created September 18, 2012 09:38
Show Gist options
  • Save SamWM/3742267 to your computer and use it in GitHub Desktop.
Save SamWM/3742267 to your computer and use it in GitHub Desktop.
ASP.NET MVC: get action / controller name
string controllerName = ViewContext.RouteData.GetRequiredString("controller");
string actionName = ViewContext.RouteData.GetRequiredString("action");
@zeinabkamel
Copy link

hello can i ask question
how can i get it but in arabic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment