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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:47:52+00:00 2026-06-19T02:47:52+00:00

I have an MVC website that is using .aspx views. I’m finding the view

  • 0

I have an MVC website that is using .aspx views. I’m finding the view using this method:

public override ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache)
    {
        string skinName =
            this.GetSkinName(controllerContext);

        string controllerName =
            controllerContext.RouteData.GetRequiredString("controller");

        string viewPath = 
            this.GetPathFromGeneralName(this.ViewLocationFormats, viewName, controllerName, skinName);

        string masterPath = 
            this.GetPathFromGeneralName(this.MasterLocationFormats, viewName, controllerName, skinName);

        if (string.IsNullOrEmpty(viewPath))
        {
            IEnumerable<string> searchedLocations =
                this.ViewLocationFormats.Union(this.MasterLocationFormats);
            return new ViewEngineResult(searchedLocations);
        }

        return new ViewEngineResult(this.CreateView(controllerContext, viewPath, masterPath), this);
    }

I have a view that is inhering from a master page. Inside it there is a hyper link to an action controller but its view is NOT connectd to the master page (I don’t want it to be).
When it tries to bring up the view of the second action (by clicking the hyperlink), I receive the error message above.
I have other links that are pointing to other content pages, and those work fine, but I can’t link to a stand-alone .aspx page (that is not inheriting from the master page).

Any advice?

  • 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-06-19T02:47:53+00:00Added an answer on June 19, 2026 at 2:47 am

    I eneded up following the suggestion to create a blank master page.
    This link has more explanation:
    http://forums.asp.net/p/1880732/5294074.aspx/1?Re+Error+Content+controls+have+to+be+top+level+controls+in+a+content+page+or+a+nested+master+page+that+references+a+master+page

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

Sidebar

Related Questions

I have a website that uses JSP as its view technology (and Spring MVC
I have the following view definition in my asp.net mvc website: <% Using Ajax.BeginForm(UsrCtlChangePassword,
I have an ASPX MVC v3 applications that is using String sourceIp = Request.ServerVariables[REMOTE_ADDR];
I have an MVC 3 website that is using Forms authentication. The user logins
I have an ASP.NET MVC (Beta 1) website that I'm using themes with. When
So I have this PHP website that I am working on that using templates.
I have a MVC website that sits on top of a WCF service. The
I have an ASP.NET MVC website that works in tandem with a Windows Service
I have an asp.net mvc website that returns a JSON result to certain pages
I have an ASP.NET MVC 3 website that works perfectly in IIS7 integrated mode.

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.