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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:02:25+00:00 2026-05-22T03:02:25+00:00

How do you map this url /Topic/topicName/action?topicId=someInt Where Topic is the controller name (this

  • 0

How do you map this url
/Topic/topicName/action?topicId=someInt

Where Topic is the controller name (this is const – it always reads “Topic”),
topicName is being ignored
action is action name,
and someInt is the topicId argument for “action”.

Here are couple of examples:
/Topic/c-sharp/AddQuestion?topicId=1

To invoke:
Controller: Topic
Action: AddQuestion
topicId =1

Where this is the action’s singnature in TopicConroller

public ActionResult AddQuestion(int topicId)  

Another example:
/Topic/MySql-queries/AddSubTopic?topicId=1

To invoke:
Controller: Topic
Action: AddSubTopic
topicId =1

Where this is the action’s singnature in TopicConroller

public ActionResult AddSubTopic(int topicId)   

etc. (all actions in Topic controller receive only one argument – that is the topic’s id).

  • 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-22T03:02:26+00:00Added an answer on May 22, 2026 at 3:02 am
    routes.MapRoute(
        "Topics",
        "Topic/{topicName}/{action}",
        new { controller = "Topic", action = "Index" }
    );
    

    where you would have:

    public class TopicController: Controller
    {
        public ActionResult AddQuestion(int topicId) 
        {
            ...
        }
    }
    

    and if you cared about the topic name you could have your controller action take it as action parameter:

    public ActionResult AddQuestion(int topicId, string topicName) 
    {
        ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having this route: map.foo 'foo/*path', :controller => 'foo', :action => 'index' I have the
I need help with this route map routes.MapRoute(Blog_Archive, Blog/Archive/{year}/{month}/{day}, new { controller = Blog,
If I have this URL http://domain.com/test3/eu/flickr-map/ What url do I use to generate the
I want to pass several parameters to this url and generate the map from
The URL http://www.fourmilab.ch/cgi-bin/Earth shows a live map of the Earth. If I issue this
I have this .htaccess rule: RewriteRule viewshoplatest/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/$ /viewshoplatest.php?$1=$2&$3=$4&$5=$6&$7=$8&$9=$10&$11=$12&$13=$14&$15=$16 It should map a URL like
i used this url to draw map with overlay line http://maps.google.com/maps/api/staticmap?size=400x400&zoom=13&path=color:0xff0000ff|weight:5|40.737102,-73.990318|40.749825,-73.987963&sensor=false i want to
If you have a float in MSSQLServer, to what do you map this in
I am developing a game for the web. The map of this game will
like this: Groovy: map = ['a':1,'b':2] doubler = this.&doubleMethod map.each(doubler) println map What's the

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.