0

I'm trying get URL using Url.Action() and T4MVC. But this method returns null:

Url.Action(result:MVC.Data.Persons.Search())

how can I solve this problem?

ahmadali shafiee
  • 4,350
  • 12
  • 56
  • 91

1 Answers1

0

I'm not sure why it's happening but this was my Area's default route:

context.MapRoute(
    "Data_default",
    "Data/{controller}/{action}/{id}",
   MVC.Data.Persons.Persons()
);

and that also made Data area inaccessible so I rolled back to non-T4MVC mode and both problems solved!

ahmadali shafiee
  • 4,350
  • 12
  • 56
  • 91