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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:35:06+00:00 2026-05-24T23:35:06+00:00

I am having two Controllers 1)ServerController 2)ClientController Both of These are having actions ServerList,ClientList

  • 0

I am having two Controllers

1)ServerController

2)ClientController

Both of These are having actions

ServerList,ClientList

AddServer,AddClient

DeleteServer,DeleteClient

and I want to follow rest principle so urls should be like this

http://mydomain/Server/ServerList which will display all server list

Now for Specific serverid there can be so many clients so url should be
http://mydomain/Server/serverid(say:1)/Client/ClientList which will display all client list for serverid 1

http://mydomain/Server/Add which will add a Server

Same for Client….

http://mydomain//Server/id/Delete which will delete server for id

Same delete for client…..

Please tell me How should I Write Routes for This,
Thanks in Advance…

  • 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-24T23:35:07+00:00Added an answer on May 24, 2026 at 11:35 pm

    After implementing this situation I really found these things

    1)According to rest principle these urls will be like this

    server/addserver,server/serverid/addclient
    //to add server and addclient(to add specific client for that server)

    server/serverlist,server/serverid/clientlist
    //displaying serverlist and clientlist(for a specific serverid display all clientlist)

    server/serverid/deleteserver,server/serverid/client
    //deletes server and client(for a specific serverid delete all clients)

    and i’m glad to say guys that everthing was under a single route

             routes.MapRoute(
            "Default",
            "{controller}/{id}/{action}",
            new { controller = "Server",id=UrlParameter.Optional ,action = "ServerList" );// Default parameters which will redirect us to ServerList.
    

    That was the solution I was looking for.
    Thanks

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

Sidebar

Related Questions

I am having a problem with using session variables. I have two controllers named
How to integrate module inside application? I have modules having two controllers and two
I've got a backbone.js application that defines two controllers, and the controllers both define
I'm having some troubles setting up two Areas in my project, I created both
Having two forms, each in it's own jQuery UI tab, how can I post
We are having two load balancing server. In that we have hosted a asp.net
I am having two activities A and B. when i click the button in
I have seen new computers having two processors on same motherboard . How can
How do I go about having two view models communicate with one another using
No one said that OrderedDictionary is having two copies of elements, one in a

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.