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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:53:20+00:00 2026-05-27T14:53:20+00:00

Quite often when writing controllers you need to use a parameter name other than

  • 0

Quite often when writing controllers you need to use a parameter name other than the default of “id”. In this case, the lazy coder in me wants to use the old fashioned convention of using parameter1=abc but then there is a little voice in my head that says I should set up custom routes. The question is which approach is better?

Thanks,

Sachin

  • 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-27T14:53:21+00:00Added an answer on May 27, 2026 at 2:53 pm

    You can do this already with the default routes but in the first case the url will be

    website/controller/action/1
    

    while on the other case the url will be

    webite/controller/action?param=abc
    

    Does this fit your needs?

    The problem is that id and param cannot be of the same type. You can’t declare the same action twice with the same signature.

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

Sidebar

Related Questions

At work I am responsible for writing specifications quite often and I am also
I quite often see on the Internet various complaints that other peoples examples of
I quite often use Drupal's Views Module to build SQL that I paste into
Quite often see in JavaScript libraries code like this: setTimeout(function() { ... }, 0);
I'm writing some tests for some forms in Django. These forms change quite often
I use the favorites in Windows Explorer quite often to gain quick access to
I use the ternary operator quite often but I've not been able to find
Quite often in ANSI C code I can see parenthesis sorrounding a single return
Quite often, in programming we get situations where null checks show up in particularly
Quite often I come across a nice looking or functional website, and wonder what

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.