I have a partial view (control) that\'s used across several view pages, and I need to pass the name of the current view back to the controller - so if there\'s e.g. validati
If you are looking for solution for asp.net core you can use:
@System.IO.Path.GetFileNameWithoutExtension(ViewContext.View.Path)
This will return the current view name.