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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:12:35+00:00 2026-05-25T23:12:35+00:00

Ok. Googling fail probably and I remember reading about this a while back but

  • 0

Ok. Googling fail probably and I remember reading about this a while back but can’t find it.

I have a View and a Partial View in different directories. In a view I say @Html.RenderPartial("[partial view name]"); how does RenderPartial figure out where to look? It must be a convention but what is it?

My view is in: WebRoot\Views\Admin\ folder and partial is at WebRoot\Views\Admin\Partials

Not sure if this the right set up.

I’m using MVC 3 (Razor engine)

  • 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-25T23:12:35+00:00Added an answer on May 25, 2026 at 11:12 pm

    you can, but you have to register the routes, to tell the view engine where to look for. example in Global.asax.cs you’ll have:

    ViewEngines.Engines.Add(new RDDBViewEngine()); 
    

    and the class is:

    public class RDDBViewEngine : RazorViewEngine
    {
        private static string[] NewPartialViewFormats = new[] {         
            "~/Views/Shared/Partials/{0}.cshtml" ,       
            "~/Views/{0}.cshtml"
        };
    
        public RDDBViewEngine()
        {
            base.PartialViewLocationFormats = base.PartialViewLocationFormats.Union(NewPartialViewFormats).ToArray();
        }
    
    }
    

    {0} is for all the subfolders with partials.

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

Sidebar

Related Questions

Googling this does little good, as you can imagine. Does anyone have resources that
This is probably a stupid question but my googling isn't finding a satisfactory answer.
I have been googling/SO:ing this issue for a while and many seem to be
While googling, I see that using java.io.File#length() can be slow. FileChannel has a size()
After googling a bit I have found some tips about how to get online
Googling shows there is to be an Add method for this, but there seems
googling I gound that this error is shown when windows can't run a .bat
I think I might fail at Googling, and maybe this pattern just doesn't fit
While googling I could find only feistel ciphers and didn't find any relevant information
Been googling for an hour and can't seem to find the answer. The following

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.