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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:37:00+00:00 2026-06-09T00:37:00+00:00

I am teaching myself asp .net mvc3. I want to create a user account

  • 0

I am teaching myself asp .net mvc3.
I want to create a user account page which has 3 tabs in it – say YourAddress, YourPhotos and YourProfile.

The 3rd tab (YourProfile) has 2 more subtabs in it … ChangeDetails and DeactiaveAccount.

They are all dynamic pages and therefore I want to keep them as separate pages.

Basically the urls would be:

localhost/MyHome/YourAddress
localhost/MyHome/YourPhotos
localhost/MyHome/YourProfile/ChangePassword
localhost/MyHome/YourProfile/DeactivateAccount

(As requested I have changed the generic tab1, tab2 etc to something in real-world scenario)

I am planning to do something like this:

public class MyHomeController : Controller
    {
        //
        // GET: /MyHome/Tab1

        public ActionResult Tab1()
        {
            return View();
        }

        //
        // GET: /MyHome/Tab2

        public ActionResult Tab2()
        {
            return View();
        }

        //
        // GET: /MyHome/Tab3

        public ActionResult Tab3()
        {
            return View();
        }
    }

How do I handle the subtabs of YourProfile? How do I call a controller within a controller?

What is the best way to accomplish this.

Thanks

  • 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-06-09T00:37:01+00:00Added an answer on June 9, 2026 at 12:37 am

    Have separate action method for each tab item in your controller.

    public class MyHomeController : Controller
    {
      public ActionResult YourAddress()
      {
         return View();
      }
      public ActionResult YourPhotos()
      {
         return View();
      }
      public ActionResult YouProfile()
      {
         return VieW();
      }
      public ActionResult ChangePassword()
      {
         return View();
      }
      public ActionResult DeActivate()
      {
         return View();
      }
    }
    

    For the sub tab content, define that route in the global.asax

    routes.MapRoute("ChangePass","YourProfile/ChangePassword", 
                          new { controller="MyHome", action="ChangePassword" });
    routes.MapRoute("DeActivate","YourProfile/DeActivate", 
                          new { controller="MyHome", action="DeActivate" });
    routes.MapRoute(
               "Default", 
               "{controller}/{action}/{id}", 
               new { controller = "Home", action = "Index", id = UrlParameter.Optional });
    

    Always use Url.Action Html Helper method to render a path to an action method.

    <div id="tabs"> 
        <ul> 
            <li><a href="@Url.Action("YourAddress","MyHome")">Address</a></li>
            <li><a href="@Url.Action("YourPhotos","MyHome")">Photos</a></li>
        </ul>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am teaching myself asp .net mvc3. I have a partial view which uses
I am teaching myself asp .net mvc3. I have researched a lot but the
I have recently started teaching myself C# and Asp.net. I am trying to build
I am teaching myself asp .net mvc 3. I read this tutorial: http://www.codeproject.com/Articles/148949/ASP-NET-MVC-3-the-Razor-View-Engine-and-Google-Map and
I'm teaching myself ASP.NET MVC, and am trying to figure out where best to
I'm teaching myself VB.Net. Here is a problem I have recently come across. Say
I am teaching myself Asp .net MVC 3. I have reached a stage where
I am teaching myself some Python and I have come across a problem which
Teaching myself some c# and my problem is that I have a class which
So I'm teaching myself Python, and I'm having an issue with lists. I want

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.