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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:01:15+00:00 2026-05-18T04:01:15+00:00

I have the following area route registration method: /// <summary> /// Registers the area.

  • 0

I have the following area route registration method:

 /// <summary>
    /// Registers the area.
    /// </summary>
    /// <param name="context">The context.</param>
    public override void RegisterArea(AreaRegistrationContext context)
    {
        // terminal customer url
        context.MapRoute("TerminalCustomer", "Terminal/Customer/{action}/{id}", new { controller = MVCt4.TerminalArea.Customer.Name, action = MVCt4.TerminalArea.Customer.ActionNames.Index, id = string.Empty });

        // terminal inbound pattern url
        context.MapRoute("TerminalInboundPattern","Terminal/InboundPattern/{action}/{id}",new { controller = MVCt4.TerminalArea.InboundPattern.Name, action = MVCt4.TerminalArea.InboundPattern.ActionNames.Index, id = string.Empty });

        // terminal outbound pattern url
        context.MapRoute("TerminalOutboundPattern","Terminal/OutboundPattern/{action}/{id}",new { controller = MVCt4.TerminalArea.OutboundPattern.Name, action = MVCt4.TerminalArea.OutboundPattern.ActionNames.Index, id = string.Empty });

        // terminal inbound shipment url
        context.MapRoute("TerminalInboundShipment", "Terminal/InboundShipment/{action}/{id}", new { controller = MVCt4.TerminalArea.InboundShipment, action = MVCt4.TerminalArea.InboundShipment.ActionNames.Index, id = string.Empty });

        // terminal outbound shipment url
        context.MapRoute("TerminalOutboundShipment", "Terminal/OutboundShipment/{action}/{id}", new { controller = MVCt4.TerminalArea.OutboundShipment, action = MVCt4.TerminalArea.OutboundShipment.ActionNames.Index, id = string.Empty });
    }

It works fine as is, but when I change to the typesafe and no magic way of like this:

            context.MapRoute("TerminalOutboundShipment", "Terminal/OutboundShipment/{action}/{id}", MVCt4.TerminalArea.OutboundPattern.Index(), new {id = String.Empty});

I get a runtime error? I have this code in the global.asax file and it works fine:

   static public void RegisterRoutes(RouteCollection routes)
    {
        // do not allow any body access our our resources
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
        routes.IgnoreRoute("favicon.ico");

        // home url ok
        routes.MapRoute("Default", "Home/{action}/{id}", MVCt4.Home.Index(), new {id = String.Empty});

}

In the areas it does not work put the main global asa it works fine?

  • 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-18T04:01:15+00:00Added an answer on May 18, 2026 at 4:01 am

    I found a example on how to use the t4mvc on the code plex site.

    codeplex

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

Sidebar

Related Questions

I have an area which is registered as: public override void RegisterArea(AreaRegistrationContext context) {
If I have the following route defined in my only area:- context.MapRoute( Search_default, Search/{controller}/{action}/{id},
I have following method in wcf webenabled service Public Person AddPerson(Person p); As of
I have following class public class ButtonChange { private int _buttonState; public void SetButtonState(int
In my XUL I have the following code fragments: <map name=KeypadMap> <area href=javascript:pad('A') coords=1,1,31,31
I have the following route data object newsRoute = new { Area = Admin,
I have some text area field in my grails application. I got the following
I have following databases: test table1 fields: id, password, name, lastname test2 table2 fields:
I have the following code that creates a draggable and droppable element/area. And when
I have the following code that collapses/expands an html area on click. By default

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.