简体   繁体   中英

specify masterpage of subdirectory pages in web.config

I know its possible to specify the masterpage of all pages using the pages element of the web.config but is it possible to specify that for all the pages under /foo/ that they should have a certain master page, and specify this in the root web.config.

I know this can probably be achieved by putting another web.config in the subdirectories that I want that specific masterpage to override but if possible I'd like to keep all of it in the one spot as when we change one section master page we are most likely going to be changing a few of them.

Try to add location element in the roor web config file with configuration specific for the subdirectory. location Element (ASP.NET Settings Schema)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM