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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:57:58+00:00 2026-05-26T10:57:58+00:00

Can you point MVC to a folder other than the default ones (Views/Shared/EditorTemplates &

  • 0

Can you point MVC to a folder other than the default ones (Views/Shared/EditorTemplates & Views/Shared/DisplayTemplates)? I’d like to either put them in subfolders below those, or in other folders outside the Shared folder.

For example, if I have an editor template under this folder:

~\Views\Order\ProductModel.cshtml

How can I tell my EditorFor template to use this tempalte name?

I tried fully qualifying it, but this doesn’t work:

@Html.EditorFor(m => m.ProductModel, @"~\Views\Order\ProductModel.cshtml")

I’ve tried using forward slashes & backslashes, with/without .chstml, every combination I can think of. I’m beginning to think this isn’t supported, but I can’t imagine why it wouldn’t be.

  • 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-26T10:57:59+00:00Added an answer on May 26, 2026 at 10:57 am

    No, I am afraid you can’t do this.

    For example, if I have an editor template under this folder

    That’s no longer an editor template. It’s a partial. If you want to share editor templates between different controllers you can simply put them inside the ~/Views/Shared/EditorTemplates folder.

    As far as subfolders are concerned then you could do this:

    @Html.EditorFor(x => x.Foo, "Order/ProductModel")
    

    which will render the ~/Views/CurrentController/EditorTemplates/Order/ProductModel.cshtml or ~/Views/Shared/EditorTemplates/Order/ProductModel.cshtml editor template.

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

Sidebar

Related Questions

For example I can point the url '^/accounts/password/reset/$' to django.contrib.auth.views.password_reset with my template filename
Can anyone point me to an up-to date diagram of the ASP.Net MVC 3
Can somebody point me to a ASP.NET MVC 2 sample with following features (most
Anyone can point me to any info regarding physics of a snooker game, if
Perhaps someone can point me in the correct direction, because I'm completely stumped on
Hoping someone can point me in the right direction. I'm building a online shop
If some one can point me in the right direction for this code for
I was wondering if anyone can point me in the right direction. I have
I just wondered if anybody can point me in the right direction: I'm looking
I have a table with one field that can point to a foreign key

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.