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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:23:35+00:00 2026-05-13T00:23:35+00:00

Some body tried Spark View Engine with asp.net mvc 2 preview 2? I have

  • 0

Some body tried Spark View Engine with asp.net mvc 2 preview 2?

I have a problem with AREAS.

It looks likes spark engine looks **.spark* files inside of Views folders only instead of Areas folder in additionally.

My question is:

Somebody has information how to add it?

  • 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-13T00:23:36+00:00Added an answer on May 13, 2026 at 12:23 am

    Spark will not automatically check the area views location in the current version. If you’re willing to change the source (which i assume you are if you’re doing mvc 2 stuff), here’s the fix:

    You have to modify the file src\Spark.Web.Mvc2\Descriptors\AreaDescriptorFilter.cs so that it reads as below (changes highlighted by **):

    Note: I don’t have the machine i did this on with me, so the slashes in the format string MIGHT need to be forward slashes.

    Also, it is possible to create this class in your own code and pass it in when you register the view engine, but I don’t remember the configuraiton code off the top of my head.

    That’s the approach I did since I wanted to modify the spark source as little as possible.

      public class AreaDescriptorFilter : DescriptorFilterBase
    {
        **private const string areaPathFormatString = "~\\Areas\\{0}\\Views";**
        public override void ExtraParameters(ControllerContext context, IDictionary<string, object> extra)
        {
            object value;
            if (context.RouteData.Values.TryGetValue("area", out value))
                extra["area"] = value;
        }
    
        public override IEnumerable<string> PotentialLocations(IEnumerable<string> locations, IDictionary<string, object> extra)
        {
            string areaName;
    
            return TryGetString(extra, "area", out areaName)
                       **? locations.Select(x => Path.Combine(string.Format(areaPathFormatString,areaName), x)).Concat(locations)**
                       : locations;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one interesting problem. I must parse mail body (regular expression), get some
Let's say I have some code like this: <html> <head><title>Title</title></head> <body> <?php if (!$someCondition){
I know there are some ways to get notified when the page body has
I am doing some TTF work for MOSA (the correlating body between all the
Consider the script.. <html> <head> <script type=text/javascript> document.write('TEST'); </script> </head> <body> Some body content
I am creating one application in .net MVC, in which I am using jQuery
I've tried some HTML DOM code from several sites, but it isn't working. It
Background: I'm using jquery blockui 2.31 on jquery 1.3.2, on ASP.NET 2.0. I'm using
I have multiple <body> tags from an word document. I do this with the
This may be familiar to some. I have a wrapper class Ex that wraps

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.