【发布时间】:2018-08-10 15:43:23
【问题描述】:
我在具有 ASP.NET MVC 5 属性路由的控制器中有操作。
public class HomeController : BaseController
{
[Route("{srcFileFormat}-to-{dstFileFormat}")]
public ActionResult Converter(string srcFileFormat, string dstFileFormat)
{
}
}
我正在尝试创建 url,但总是得到 Null 而不是 URL。有什么建议如何在我的情况下一起使用UrlHelper.Action 和Attribute Routing?
@Url.Action("docx-to-pdf", "Home")
【问题讨论】:
标签: c# asp.net-mvc asp.net-mvc-5 asp.net-mvc-routing attributerouting