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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:52:33+00:00 2026-05-21T05:52:33+00:00

So in order accomplish what I asked in this post I did the following:

  • 0

So in order accomplish what I asked in this post I did the following:

    [iPhone]
    [ActionName("Index")]
    public ActionResult IndexIPhone()
    {
        return new Test.Areas.Mobile.Controllers.HomeController().Index();
    }

    [ActionName("Index")]
    public ActionResult Index()
    {
        return View(); 
    }

Which still serves the same view as the Index action method in this controller. Even though I can see it executing the Test.Areas.Mobile.Controllers.HomeController().Index() action method just fine. What’s going on here? And how do I serve the Index view from Mobile area without changing the request URL (as asked in the original post referenced above)?

  • 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-21T05:52:34+00:00Added an answer on May 21, 2026 at 5:52 am

    You have a few options:

    1. Redirect to the Action you’d like to return: return RedirectToAction("Action-I-Want").
    2. Return the View by name: return View("The-View-I-Want").

    Note that with the 2nd approach you’d have to put your view in the “Shared” folder for all controllers to be able to find it and return it. This can get messy if you end up putting all your views there.

    As a side note: The reason your work doesn’t find the view is because default view engine looks for the view in the folder that “belongs” to the current executing controller context, regardless of what code you’re calling.

    Edit:

    It is possible to group all “mobile” views in the same folder. On your Global.asax (or where ever you’re setting up your ViewEngine, just add the path to your mobile View in the AreaViewLocationFormats. Mind you, you’ll still have to name your views differently.

    You can also write your own view engine. I’d do something like detecting the browser and then serving the right file. You could setup a convention like View.aspx, and View.m.aspx.

    Anyhow, just take a look at WebFormViewEngine and you’ll figure out what works best for you.

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

Sidebar

Related Questions

What should i research in order to accomplish this task? I am using MS-SQL
Order by descending is not working on LINQ to Entity In the following Query
In order to achieve spriting by compass according to the documentation I wrote this:
This is how I post a Micropost as current_user ( Devise ): microposts_controller.rb: def
I need to consume a Web Service via SSL. In order to accomplish that
This question was asked but was not answered. I have contact form and I
I'm sure some variation of this question has been asked before but all other,
Im setting up a multi tenant database and came across the following blog post
Client asked this morning if we can provide a subscription service whereby: Mail arives
order by in query is taking to much time in MySQL. SHOW PROFILES shows

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.