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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:31:21+00:00 2026-05-20T14:31:21+00:00

In my application I have two Master pages and they are used in various

  • 0

In my application I have two Master pages and they are used in various different cases. Say one master view just renders the top half of the page and another master view that renders the top half plus a navigation bar to the side. We pass around data to these Master pages using view models

Now in my controller my index action refers to the MasterPage with the navigation bar and a details tab that does not need the navigation bar. But there is a problem now whenever I try to render the Details page my site crashes at the Site.MasterWithNavigation although it is noway involved with my details view. i have no clue how it lands up there.

On attaching the debugger and checking where the pae is crashing it showed me it is crashing at the Site.MasterWithNavigation and on checking the call stack there was just one entry which took me to my other Site.Master and showed the exception at a random partial view rendering line. I thought just for the heck of it let me comment out that piece of line and again saw the crash occurring now at a different line where I render an HTML input element.

Any idea why the hell I am seeing this? Note we have other pages that use the second master page but for some reason they are all in a different controller called WhateeverDetailsController. Do you think there is a problem when we use two different master pages across two different actions within the same controller.

  • 1 1 Answer
  • 1 View
  • 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-20T14:31:22+00:00Added an answer on May 20, 2026 at 2:31 pm

    I am not sure why you are using multile master pages together but I use one master page only, and expose relevant tags to all pages such as:

    <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
        Title
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="ScriptContentHolder" runat="server">
        <%= Html.Script("jquery-1.4.4.min.js")%>
        <%= Html.Script("jquery-ui-1.8.7.min.js")%>
        <%= Html.Script("MicrosoftAjax.js")%>
        <%= Html.Script("MicrosoftMvcAjax.js")%>
        <%= Html.Script("MicrosoftMvcValidation.js")%>
    </asp:Content>
    <asp:Content ID="Content3" ContentPlaceHolderID="MenuContent" runat="server">
        <% Html.RenderPartial("IManagerLinks"); %>
    </asp:Content>
    <asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
        <div id="leftContent50">
            <h4>add a new comment</h4>
            <% Html.RenderPartial("AddCommentUC", Model.AddComment); %>
        </div>
        <div id="rightContent50">
            something else here
        </div>
        <br style="clear: both;" />
    </asp:Content>
    

    You could very easily do the same for the top part of your page, side part and title and use css to style everything up.

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

Sidebar

Related Questions

In Application i have two buttons in which one button is used as a
I have a partial view ( Partial.ascx ), two master pages( Master1.Master and Master2.Master
I have application where i have two view controllers my first view and second
I have application in VB.net that have two different form (Form1 and Form2). Now
I have one (razor) page that contain 5 different partial views. Each partial view
I have two XML files that are generated by another application I have no
In my application i have two drop down boxes first box had origin second
In the asp.net mvc 3 application I have two views which have the same
I have two application that need to talk to each other. App1 needs to
We have two tables in our application that both have a ShowOrder column. We

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.