---
title: Using both ASPX and portal templates on a single site
related:
  - https://docs.kentico.com/k11/developing-websites/developing-websites-using-aspx-templates.md
  - https://docs.kentico.com/k11/developing-websites/developing-websites-using-the-portal-engine.md
  - https://docs.kentico.com/k11/developing-websites/developing-websites-using-aspx-templates/creating-master-pages-for-aspx-templates.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

It is possible to combine [ASPX page templates](https://docs.kentico.com/k11/developing-websites/developing-websites-using-aspx-templates.md) and [portal engine page templates](https://docs.kentico.com/k11/developing-websites/developing-websites-using-the-portal-engine.md) on the same website.

## Sharing a master page on hybrid websites

If you have a website built using the portal engine development model, the master page and all other pages use portal engine page templates. Unfortunately, you cannot "insert" ASPX pages directly into the portal engine master page.

However, you can use the following workaround:

1. Create a copy of your portal engine master template as an [ASPX master page](https://docs.kentico.com/k11/developing-websites/developing-websites-using-aspx-templates/creating-master-pages-for-aspx-templates.md) (**.master** file) and assign it to your ASPX templates.
   - This scenario works, but the drawback is that you now need to manage the master page in two locations.
2. Take all content (HTML and controls) that you have above the **Page placeholder** web part on the portal master page and place it into a new user control named **Header.ascx**.
3. Take all content from below the Page placeholder and place it into a user control named **Footer.ascx**.

   ![](https://docs.kentico.com/docsassets/k11/using-both-aspx-and-portal-templates-on-a-single-site/image.png)
4. Delete the content of your portal engine master page and replace it with the following web parts:

   - **User control** - set the _User control virtual path_ property to load **Header.ascx**
   - **Page placeholder**
   - **User control** - set the _User control virtual path_ property to load **Footer.ascx**
5. Remove the content from your ASPX master page and replace it with the following controls:

   - The **Header.ascx** user control
   - The **ContentPlaceHolder** control
   - The **Footer.ascx** user control

You can now manage the header and footer in a single place for both the portal engine and ASPX master page.

> **Note:** **Note**: When you create a website with both ASPX template and portal engine pages, you cannot use [page nesting](https://docs.kentico.com/k11/developing-websites/developing-websites-using-the-portal-engine/inheriting-portal-engine-page-content.md) between the two different types of pages.
