How do you access the current RouteData from View in .net MVC?

后端 未结 1 627
再見小時候
再見小時候 2020-12-29 01:09

If I want to directly access the RouteData (the current action or parameter values for example) from the View, rather than having to pass it in fro

相关标签:
1条回答
  • 2020-12-29 01:37
    this.ViewContext.RouteData
    

    should do the trick.

    0 讨论(0)
提交回复
热议问题