0

I'mm building an ASP.net site and I want to divide it into folder, but I want a masterpage in the main folder that everyone will access from anywhere how do I tell a page that it's master page is in another folder? (For example, think that I want my Login page within Users folder can access masterpage in main folder (Main folder > users))

4

2 回答 2

0

Set the path from the root folder of your web application to the desired master page file in the MasterPageFile attribute of the @ Page directive. For example if your web application is in folder C:\MyProjects\MyWebApplication (the folder where your Web.config is located) and your master page file Bar.master is located in the folder C:\MyProjects\MyWebApplication\Foo, then set MasterPageFile to "~/Foo/Bar.master".

于 2013-10-26T07:39:43.187 回答
0

U can choose master page at the time you create other pages. so when you are creating the Login page choose master page from the Main folder

于 2013-10-26T07:40:01.167 回答