Wednesday, February 27, AM. User posted No, a content page can only have one master page at a atime. Wednesday, February 27, PM. User posted Hi, Content page can have one Master page.
Muhammad Ovais Web Developer Bistronix. Thursday, February 28, AM. User posted It is not possible for a single to have a multiple master page but u can have multilevel master page forexample master1. User posted Hi, One page only allowed has one master page, but you can use the nested master page for one page, about the nested master page, you can refer: Nested ASP. If you'd like for them to use the content from the ContentPlaceHolder control on the master page, simply click on the smart tag symbol the small black arrow in the upper-right corner of the control and choose Default to Masters Content from the smart tag as shown in figure 8.
When you do so, the menu item changes to Create Custom Content. Clicking it at that point removes the content from the master page allowing you to define custom content for that particular Content control. The association between a master page and a content page can be configured in one of four different ways:. NET page. It is also the method used to apply the master page when you check the Select Master Page checkbox as you did in Exercise 1. By setting the MasterPageFile property in code, you can apply a particular master page to your content at runtime.
This is useful in cases where you may need to apply a specific master page based upon a users role or some other criteria. The page on which this property is being set must also have a Content control as the top-level control for the page. When using this method, keep in mind that web. Any MasterPageFile attribute set in a Page directive will also override this setting. A master page can expose properties by simply making those properties public within the master page.
For example, the following code defines a property called SomeProperty:. To access the SomeProperty property from the Content page, you will need to use the Master property like so:. Master pages are the perfect solution for ensuring a common look and feel across a large Web application.
However, it's not uncommon to have certain parts of a large site share a common interface while other parts share a different interface. To address that need, multiple master pages are the perfect solution. However, that still doesn't address the fact that a large application may have certain components such as a menu, for example that are shared among all pages and other components that are shared only among certain sections of the site.
For that type of situation, nested master pages fill the need nicely. As you've seen, a normal master page consists of a master page and a content page. In a nested master page situation, there are two master pages; a parent master and a child master. The child master page is also a content page and its master is the parent master page.
In a nested master scenario, this would be the parent master. Another master page would use this page as its master page, and that code would look like this:. A new Master Page appears in the Master Pages palette. Developed by Therithal info, Chennai. Toggle navigation BrainKart. Master Pages Any text or object that you place on the master page will appear on the entire document pages to which the master is applied.
Related Topics Scrolling the Document. Magnifying and reducing with the zoom tool. Formatting a Document. Working with pages. Print a document. Take our short survey. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. How many master pages can an application have? Ask Question. Asked 8 years, 7 months ago. Active 8 years, 7 months ago. Viewed 1k times.
0コメント