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

  • SEARCH
  • Home
  • 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 4324650
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:09:40+00:00 2026-05-21T09:09:40+00:00

I have the following Hierarchy: MainMasterPage: <%@ Master Language=C# AutoEventWireup=true CodeBehind=MainAdmin.master.cs Inherits=MyWebsite.Admin.MainAdmin %> <form

  • 0

I have the following Hierarchy:

MainMasterPage:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MainAdmin.master.cs" Inherits="MyWebsite.Admin.MainAdmin" %>

<form id="form1" runat="server">
<div id="MainMenu_Div" runat="server">
    <asp:ContentPlaceHolder ID="MainMenu" runat="server"/>
</div>

<div id="ContentArea_Div" runat="server">
    <asp:ContentPlaceHolder ID="ContentArea" runat="server"/>
</div>
</form>

TemplateMasterPage:

<%@ Master Language="C#" MasterPageFile="~/Admin/MasterPages/MainAdmin.Master" AutoEventWireup="true" CodeBehind="TemplateMasterPage.master.cs" Inherits="MyWebsite.Admin.TemplateMasterPage" %>

<asp:Content ID="ContentArea" ContentPlaceHolderID="ContentArea" runat="server">
    <div id="InputControls_Div" runat="server">
        <asp:ContentPlaceHolder ID="InputControls" runat="server" />
        <br />
        <asp:Button ID="Submit_Btn" runat="server" Text="Submit" 
            onclick="Submit_Btn_Click" />
    </div>


    <div id="AfterSubmission_Div" runat="server" visible="False">
    <asp:Button ID="AnotherBtn" runat="server" CssClass="linkLookingButton" 
        onclick="AnotherBtn_Click" />
    </div>
</asp:Content>

TemplateMasterPage (Code Behind)

public partial class TemplateMasterPage : System.Web.UI.MasterPage
{
    public string BtnText
    {
        get { return AnotherBtn.Text; } //AnotherBtndoesn't exist in the current context
        set { AnotherBtn.Text = value; } //AnotherBtndoesn't exist in the current context
    }


    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Submit_Btn_Click(object sender, EventArgs e)
    {
        Submit_Btn.Enabled = false; //Submit_Btn doesn't exist in the current context

        InputControls_Div.Visible = false; //InputControls_Div doesn't exist in the current context
        AfterSubmission_Div.Visible = true; //AfterSubmission_Div doesn't exist in the current context
    }

I commented the errors in my Code Behind sample .. this is used to work before using Nested Master Pages!

  • 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-21T09:09:41+00:00Added an answer on May 21, 2026 at 9:09 am

    Just built a website based on your code fragments.

    Some thoughts on it:

    • Your class is named TemplatePage in code behind but refered as TemplateMasterPage.
    • There is no control AnotherBtn. There is Submit_Btn only.
    • There is no control Btn. There is Submit_Btn only.
    • I get no errors on InputControls_Div or AfterSubmission_Div.

    So all I can say, that your compiler is right and you have to add the missing buttons or rename the code to make it compile successfully.

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

Sidebar

Related Questions

Let's have the following class hierarchy: public class ParentClass implements SomeInterface { } public
Suppose we have the following class hierarchy: class Base { ... }; class Derived1
I have the following hierarchy: class Base { public Base(string sMessage) { //Do stuff
I have the following hierarchy of classes class classOne { virtual void abstractMethod() =
I have the following hierarchy in my application: UINavigationController |__ UITabBarController |__ UINavigationController |__
Say I have the following hierarchy: public class MyClass { protected virtual void Method()
This is in NetBeans 6.5, Java 6. I have the following hierarchy in the
I have the following class hierarchy in C++: class Base { virtual void apply()
I have the following hierarchy: Graduate.cpp (abstract) College.cpp (abstract) Ecollege.cpp University.cpp (abstract) Tuniversity.cpp Huniversity.cpp
I have the following class hierarchy [BsonKnownTypes(typeof(MoveCommand))] public abstract class Command : ICommand {

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.