asp.net mvc - How can I get the name of the view in master page -


Actually, the question is in the title; I have an asp.net mvc application, and in the master page, Need to acquire and use.

For example, I use the word "Vignem" in the header of each page. I would like to include JS or use it in a render action call. Of course, I can make asp: ContentPlaceHolder in the main section of the main page, but I have noticed that the subject I am considering is with the exception of the same name, therefore, I am trying to rephire, and I do not see anything in either the page or any vexax variable.

Thank you

You should be able to get the name of this view:

  IView view = ((ViewPage) this.Page) .ViewContext.View; String ViewName = (see WebFormView) .ViewPath;  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -