Does a MasterPage know what page is being displayed?

前端 未结 12 1756
無奈伤痛
無奈伤痛 2021-01-02 11:53

When I navigate on a website utilizing MasterPages, does the application know what page I am on? If so, does it store it in an object I can access?

The reason I am

12条回答
  •  北荒
    北荒 (楼主)
    2021-01-02 12:04

    You'd probably just use one of the Request path from within the master page to set the current. I'd probably also have a property on the master page to override it, so that pages without links or something could set it to something reasonable.

提交回复
热议问题