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 824617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:07:29+00:00 2026-05-15T03:07:29+00:00

I am tring to access a custom property on my Master page in a

  • 0

I am tring to access a custom property on my Master page in a custom PageBase that resides in the App_Code folder. I can get this to work no problem in a web app but im having trouble doing it in the website project.

PageBase:

public abstract class PageBase : ClientSidePageBase
{
    public WebMessage Message
    {
        get
        {
           if (this.Master is MainMaster)
                return ((MainMaster)this.Master).Message;
            else if (this.Master is PopupMaster)
                return ((PopupMaster)this.Master).Message;
            else
                return null;
        }
    }
}

The above sample is what is in my web application and works fine but if i try and put this in the App_Code it doesnt pick up the MasterPage class so I cant access the property.

Any ideas? Hopefully its something easy i am over looking.

  • 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-15T03:07:30+00:00Added an answer on May 15, 2026 at 3:07 am

    The difference between a “Web Site” and “Web Application” is that with “Web Site”, only the code in “App_Code” is compiled into a .net assembly; everything else is compiled at run-time; with “Web Application”, all your code if compiled into a .net assembly.

    I’m guessing that your master page is not in App_Code. You said that the PageBase class is in App_Code. Therefore, it sounds like you’re trying to inherit a class that is compiled at run-time in a class that is pre-compiled.

    I think that you need to either have your PageBase class outside of App_Code, or you need to have the code for the master page inside of App_Code.

    Please let us know how you make it work.

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

Sidebar

Related Questions

I'm getting this error: Templates can be used only with field access, property access,
I am trying to access a label property on a custom UiTableViewCell (subclassed UITableViewCell)
Please help me understand how to get custom class instances to access variables defined
I'm trying to access my google talk contacts' custom status messages with xmpppy. I'm
I'm tring to access a function of an instance which is in an arraylist.
Trying to access a Servlet from a button on HTML page //Html Page FORM
I am trying to access information on a website that uses frames. When I
I am trying to access all the data from database listOfFolder table folder and
I am trying to access a file for xml parsing with this: InputStream inputStream
I have spent hours trying to get my project working and I just can't

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.