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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:30:42+00:00 2026-05-26T05:30:42+00:00

I have a cshtml under Shared folder. I am doing a RedirectToAction() to this

  • 0

I have a cshtml under Shared folder. I am doing a RedirectToAction() to this page but its not looking for this file in Shared folder. Its only looking in the appropriate folder under views. It uses to look into Shared folder before and I have no idea what I could have changed that breaking lookup. Any ideas?

  • 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-26T05:30:43+00:00Added an answer on May 26, 2026 at 5:30 am

    You cannot do a RedirectToAction to a view. You are doing (as it name suggests) a redirect to an action. It is this action that returns a view. By default it will look for views in the ~/Views/ControllerName and ~/Views/Shared. So let’s suppose that you have the following action which performs a redirect:

    public class HomeController: Controller
    {
        public ActionResult Index()
        {
            return RedirectToAction("Index", "Products");
        }
    }
    

    which would redirect to the Index action on the Products controller:

    public class ProductsController: Controller
    {
        public ActionResult Index()
        {
            return View();
        }
    }
    

    Now the Index.cshtml view could be in ~/Views/Products/Index.cshtml or in ~/Views/Shared/Index.cshtml.

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

Sidebar

Related Questions

I have a table used within a cshtml page. I have following requirements This
I have a cshtml page that gives these errors: Uncaught ReferenceError: $ is not
I'm using MVC3 razor and in Views folder I have 4 folder: Shared _Layout.cshtml
I have an Index.cshtml view: @model AttendenceModel @{ Layout = ~/Views/Shared/_Layout.cshtml; } @using (Html.BeginForm(VisOppsummering,
In the file FirstView.cshtml I have an event - clicking to a cell of
Mypage.cshtml have a page and have a domain xxx.com and a subdomain test.xxx.com that
I have a page X.cshtml with the following code: @helper CodeTest{ <h1>Test</h1> } And
I'm building an ASP.NET MVC3 website. I have some javascript in my .cshtml file:
I have a .csHtml -razor file with a javascript function that uses the @Url.Content
I have a myPage.cshtml page. i have written a @helper method( myMethod() ) in

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.