I'm invoking my view using
@Html.EditorFor(m => Model.FileListBefore)
I would like to get the 'FileListBefore' name from the inside of the view. How can I do that?
EDIT (more info):
'EditorFor(m => Model.FileListBefore)' uses my own sub-view. In that sub-view I want to retrieve the name of property which invoked this view.
Why? Because I'm calling
@Html.EditorFor(m => Model.FileListBefore)
@Html.EditorFor(m => Model.FileListAfter)
'FileListBefore' and 'FileListAfter' are the same type 'FileList' (my own class) and they call the same sub-view. I want to get the calling names ('FileListBefore' and 'FileListAfter) inside sub view because I want to identify them and add it do div 'id' value.