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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:44:16+00:00 2026-06-15T06:44:16+00:00

In my MVC3 C# project, I have been looking at ways to construct a

  • 0

In my MVC3 C# project, I have been looking at ways to construct a navigation menu in controller code and pass that to the master page. (i want to initialize the menu in controller so I can do some authorization and roles checking, etc…)

So far, I found several answers on here taht all seem to require overriding the OnActionExecuted method of a BaseController (from which all other controllers extend)

Example 1(see accepted answer): How to create a strongly typed master page using a base controller in ASP.NET MVC

Example 2: "Security aware" action link?

But wy not just put that same code in the Base Controller’s constructor?

  • 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-15T06:44:19+00:00Added an answer on June 15, 2026 at 6:44 am

    If all your controllers inherit from the same base controller, there is no reason why you could not do it this way.

    The advantage of an ActionFilterAttribute is that it allows you to insert your logic on any controller by simply decorating it with the attribute, allowing you the freedom of inheriting from any base class you choose.

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

Sidebar

Related Questions

Edit: showed my exact web.config code. I have a MVC3 project that works fine
I have MVC3 project & Valums file uploader . The code is following <script
I have a Create View page in my MVC3 project to create instances of
I have an MVC3 project that uses EF 4.1 database first with a SQL
I have been publishing my MVC3 project to IIS including All Project Files, this
For a current MVC3 project I have a model that has multiple pages for
I have several views in an MVC3 project that allow a user to enter
I have been working on MVC3 project. I have just created Sample email sending
As I have been following a MusicStore tutorial, new MVC3 project created a following
I have an MVC3 Project running with EF Code First. Here is my code

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.