这是我的原始代码:
@Url.Action("LoginYoutube", "Account", new { returnUrl = Request.QueryString["ReturnUrl"] }, "http")
这将生成:http://localhost:2543/Account/LoginYoutube
使用 T4MVC 我可以:
Url.Action(MVC.Account.LoginYoutube().AddRouteValue("returnUrl", Request.QueryString["ReturnUrl"]))
并生成:/Account/LoginYoutube
我需要最后一个带有“http”的参数才能获得http://localhost:2543。问题在于 T4MVC 我只能为 Url.Action() 的调用放置 1 个参数。
我怎样才能让它工作?