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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:46:10+00:00 2026-05-30T06:46:10+00:00

I am working on a social networking site where we are implementing profiles, pages,

  • 0

I am working on a social networking site where we are implementing profiles, pages, groups etc. At this stage, we are working with profiles and pages. They both have wall where user can put some status, pics etc, more like facebook wall.

Now a controller WallController can be accessed by two different urls.

www.mysite.com/profile/121/some-user/wall
and
www.mysite.com/page/222/some-page/wall

On the left hand side of the page, I load some basic information (name etc) and a menu.
saying

www.mysite.com/profile/121/some-user/photos
www.mysite.com/profile/121/some-user/videos
www.mysite.com/profile/121/some-user/songs

This applies to both (page and profile).

here is my route for page

   routes.MapRoute(
           "Page-wall", // Route name
           "page/{id}/{name}/wall", // URL with parameters
           new { controller = "wall", action = "details", id = "", name = "" },
           new { id = @"\d+" },
           new string[] { "PagesNameSpace.Controllers" } // Parameter defaults
           );

and for profile

      routes.MapRoute(
           "profile-wall", // Route name
           "profile/{id}/{name}/wall", // URL with parameters
           new { controller = "wall", action = "details", id = "", name = "" },
           new { id = @"\d+" },
           new string[] { "ProfileNameSpace.Controllers" } // Parameter defaults
           );

Now, the problem is, I have to identify what object is accessing the url. here is my WallController

public class WallController : Controller
{
     public ActionResult Details(long id, string name)
     {

        return View(LoadWallData(id));
     }

}

I see a route value dictionary as a solution, but would like to see, what is the best solution for this kind for situations.

help will be appreciated.

Regards
Parminder

  • 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-30T06:46:12+00:00Added an answer on May 30, 2026 at 6:46 am

    I would probably do the following, you just add the values into your routes:

    Change your controller:

    public class WallController : Controller
    {
         public ActionResult Details(long id, string name, string obj)//added param
         {
    
            return View(LoadWallData(id));
         }
    }
    

    And then your routes:

    routes.MapRoute(
               "Page-wall", // Route name
               "page/{id}/{name}/wall", // URL with parameters
               new { controller = "wall", action = "details", id = "", name = "",
                                                       /*See this>>>> */ obj="page"},
               new { id = @"\d+" },
               new string[] { "PagesNameSpace.Controllers" } // Parameter defaults
               );
    
    routes.MapRoute(
               "profile-wall", // Route name
               "profile/{id}/{name}/wall", // URL with parameters
               new { controller = "wall", action = "details", id = "", name = "",
                                                 /*See this>>>> */ obj="profile" },
               new { id = @"\d+" },
               new string[] { "ProfileNameSpace.Controllers" }
               );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a social networking site and it has a wall like
I'm working on a social networking system that will have comments coming from several
I am working on social networking site. now our team decide to store user
I am working on a social networking site with a family tree that is
I'm currently working on a project about social networking, where I have some problems
I am working on a social networking site, where users can send messages to
I'm working on a new social networking site and I want to give users
About to start working on a social networking site, but I'd like to incorporate
I am currently working on a web app for social networking site but it
I'm currently working on two social networking sites that have a lot in common,

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.