[英]T4MVC Url.Action(MVC.Area.Controller.Action()) returns null
I'm trying get URL using Url.Action()
and T4MVC. 我正在尝试使用
Url.Action()
和T4MVC获取URL。 But this method returns null
: 但是此方法返回
null
:
Url.Action(result:MVC.Data.Persons.Search())
how can I solve this problem? 我怎么解决这个问题?
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! 而且这也使
Data
区域无法访问,所以我又回到了非T4MVC模式,两个问题都解决了!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.