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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:27:46+00:00 2026-06-17T12:27:46+00:00

I have 2 MVC projects. There is a common page that I want to

  • 0

I have 2 MVC projects. There is a common page that I want to reference directly instead of having to re-write. I’m doing so like this:

public ActionResult test()
{
    OldController.Controllers.PatronController temp = new OldController.Controllers.PatronController();

    return temp.Index();
}

The problem is, in “OldController” there is some functionality that get set in the OnActionExecuting function. When I call the function like I’m doing above, OnActionExecuting isn’t being called.

How can I share the common page between the two projects (so I can return it OnActionExecuting?

  • 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-06-17T12:27:47+00:00Added an answer on June 17, 2026 at 12:27 pm

    Ideally, you want to keep navigation consistent in each project and still re-use the core functionality.

    For that reason, I recommend:

    1) creating a 3rd MVC Project with an Action Partial (Partial with Action Method — and Controller).

    2) Add a reference for your new MVC project to your 2 primary MVC projects.

    3) In each of your primary MVC projects, create Views that render your Action Partial within a View.

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

Sidebar

Related Questions

I have an MVC project that I would like to write in .NET 4.0
I have an ASP.NET MVC 3 Solution(C#) Containing multiple projects. There is a services
I have a mvc project and on one page there is a table of
Is there a way to share a master page between different MVC projects/applications? We
We have several projects (ASP.NET MVC) that will require a Role / User /
I have two asp.net MVC 3 web projects that uses the same views, and
I have a web project in Asp.net MVC where in many pages, there is
I have a Solution with several projects in it, including two asp.net mvc projects
Does anyone have the issue with Resharper where opening a solution with MVC projects
I have two projects.One project is build in MVC asp.net and the other project

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.