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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:33:32+00:00 2026-05-22T21:33:32+00:00

Is it just me or has anyone else been annoyed by the fact that

  • 0

Is it just me or has anyone else been annoyed by the fact that we have to use a lot of constants to handle redirections from one action to another across different controllers. I have tried to implement a reflection based approch to tackle this issue, but was wondering how others have approached this ( If you have seen this as an issue , of course 🙂 )

As an example, what I did is implemented something like this to get an action name.

  public static string ActionName(Func<ActionResult> methodContainer)
        {
            return methodContainer.Method.Name;
        }

and to get the controller name,

   public static string ControllerName<T>() where T : class
        {
            Type t = typeof (T);
            return t.Name.Replace(ControllerConstants.Controller, string.Empty);
        }

Any better approaches than this?

/Bumble Bee

  • 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-22T21:33:33+00:00Added an answer on May 22, 2026 at 9:33 pm

    Check out MVCContrib library, link below addresses exactly the issue you’re dealing with…it’s been around since MVC v1.

    http://mvccontrib.codeplex.com/wikipage?title=RedirectToAction&referringTitle=Documentation

    It’s also on nuget, so it should be easy to give it a spin.

    http://nuget.org/List/Packages/MvcContrib.Mvc3-ci

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

Sidebar

Related Questions

I just want to see if anyone else has noticed that when loading images
Just wondering if anyone else has spotted this: On some user's machines running our
Myself and some colleagues have just been told that we are all taking the
I just found Has anyone published a detailed comparison between different in-memory RDBMSs ?
Just wondering if anyone has any ideas on how we can style templates... Like
Just wondering if anyone has some good resources for learning how to create new
I'm just wondering if anyone has had any problems having too many subscribers for
I was just wondering if anyone has come across anything offering similar search functionality
I'm just curious to know if anyone has used (successfully) Fusion Charts with Open
Im just wondering if I am pushing JSON too far? and if anyone has

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.