Question

I have a master page where I am calling another sub-page using the <asp:Content></asp:Content>

  • Default.aspx + master = Homepage
  • why_choose.aspx + master = Subpage

Inside the Subpage I have a menu which other Subpages will also share, so instead of adding the menu in each Subpage, is there any way I can add a <asp:Content></asp:Content> within the Subpage itself to load the menu?

If so, how do I do that?

Was it helpful?

Solution

I think maybe you are misinterpreting master pages.

For your described scenario, your master page, generally Site.master should contain your menu markup.

Now, any pages you create (Default.aspx, why_choose.aspx) and use your Site.master page will also include your menu, although the markup is not visible within these sub pages.

If you want to load some other content into these sub pages, you simply put that new content into the asp:contentplaceholder on the sub pages.

Read up some more on master pages here

OTHER TIPS

try using an iframe element and loading your additional content in it.

iframe on w3schools

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top