Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7564971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:01:46+00:00 2026-05-30T14:01:46+00:00

Summary of problem: I would like to create a master page, and from that

  • 0

Summary of problem:

I would like to create a master page, and from that a nested master page, and finally from that a webform that inerhits from the nested master page.

The master page should have property Foo and the nested master page should have property Bar

Ideally I would like for the webform to have access to those inherited properties, however when I change my webform’s code-behind class from System.Web.UI.Page to NestedMasterPage1 I’m getting an RTE saying that I need to extend class ‘System.Web.UI.Page’.

I bet there is a better way of doing this, but so far I can’t find one.

Thanks for reading!!!

Steps to reproduce:
Create Site1.Master and from that page create NestedMasterPage1.master and from that create WebForm1.aspx.

On the codebehind for Site1.Master create public Property Foo

On the codebehind for NestedMasterPage1.master create Public Property Bar

Change the codebehind for NestedMasterPage1 to inherit from Site1 instead of System.Web.UI.MasterPage

Change the codebehind for Webform1.aspx, inheriting from NestedMasterPage1 instead of System.Web.UI.Page

Everything compliles, running gets the following error:

“Parser Error Message: ‘WebApplication2.WebForm1’ is not allowed here because it does not extend class ‘System.Web.UI.Page’.”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:01:48+00:00Added an answer on May 30, 2026 at 2:01 pm

    You can’t do that; pages do not inherit their master pages.

    Instead, you can cast the page’s Master property to NestedMasterPage1 to access the master class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Summary of the problem: For some decimal values, when we convert the type from
Here's my problem: there's an internal issue tracking system that has a nice summary
I am trying to write documentation comments however I have a problem. /// <summary>
I have an existing application that I'm supposed to take and create a mini
I have an SSIS package that does the following: Selects the connection strings from
I would like to find the R implementation that most closely resembles Stata output
i would like to create a buffer around a line-shapefile with wgs84 coordinates. I
In summary, I am having a problem where I read what I expect to
sorry, for the cryptic title i didn't find any better summary for my problem.
I would like to invoke heavy duty method dowork on a separate thread and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.