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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:24:17+00:00 2026-05-17T00:24:17+00:00

I am using MVC 2. I have 2 controllers called Application and Note. The

  • 0

I am using MVC 2.

I have 2 controllers called Application and Note. The application is a loan application. A note can be added to an application.

On my Index I have a grid that displays all the applications, and an action column with a link that says “Add Note”.

In my Application controller I have action methods for create and edit. In my Note controller I have action methods for create, edit and delete.

I was wondering if the following is possible when the user clicks on the “Add Note” link to go to a URL like:

Application/1/Note/Create

1 is the application ID. Note would be the Note controller, and Create is the action method in the Note controller. Is something like this possible?

I started with the mapping in my global.asax, but not sure if it is correct:

routes.MapRoute(
   null,
   "Application/{ApplicationID}/{controller}/{action}",
   new { controller = "Note", action = "Create" });

How would I create the link in my grid using the action link?

Please could someone advise?

EDIT:

The grid above is on my Index view in my Home direcotry. So on this grid I need to concatenate the link to display as above. I’m struggling to create this link on my Index view. It’s not concatenating correctly. Currently I have this:

Html.ActionLink(“Add Note”, “Create”, “Note”, new { ApplicationID = c.ApplicationID }, null)

And it is displaying as /Note/Create/?ApplicationID=1

I need it to display as:

/Application/1/Note/Create

Thanks
Brendan

  • 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-17T00:24:17+00:00Added an answer on May 17, 2026 at 12:24 am

    To create a link using this route try using the ActionLink helper method:

    <%= Html.ActionLink(
        "Create note", "Create", "Note", new { ApplicationID = "123" }, null
    ) %>
    

    will produce /Application/123 and navigate to the Create action of NoteController and pass 123 as the applicationID parameter:

    public class NoteController : Controller
    {
        public ActionResult Create(int applicationID)
        {
            return View();
        }
    }
    

    This assumes the routes are registered like the following:

    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
    
        routes.MapRoute(
            null,
            "Application/{ApplicationID}/{controller}/{action}",
            new { controller = "Note", action = "Create" });
    
        routes.MapRoute(
            "Default",
            "{controller}/{action}/{id}",
            new { controller = "Home", action = "Index", id = UrlParameter.Optional }
        );
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an MVC application that is using MEF for the controllers, all working
I have an ASP.NET MVC application using Authorization Attributes on Controllers and Actions. This
I have a CodeIgniter MVC application. I have a model called city that has
Using Unity in an ASP.Net MVC 2 app I have various dependencies on Controllers
I have a following table using MVC that shows number of items the user
We have an ASP.NET application on ASP.NET 4.0 using MVC 3 which uses Windows
I am creating an MVC application framework, using only libararies and components that I
I am creating a modular ASP.NET MVC application using areas. In short, I have
I have a BaseController that all Controllers inherit from. The CaseController has the [Authorize]
I have implemented my mvc base controller called DefaultController using dependency injection pattern in

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.