Retrieve the current view name in ASP.NET MVC?

后端 未结 10 887
谎友^
谎友^ 2020-11-28 09:37

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

10条回答
  •  没有蜡笔的小新
    2020-11-28 10:28

    Shouldn't you be using a validation method like Nerd Dinner implements?

    That way you don't actually need to do all this and you can just return the View.

提交回复
热议问题