MVC新手......
以下行是我找到的示例代码,包含在ASPX页面中。
<URI><%=new Uri(Request.Url,
Response.ApplyAppPathModifier("~/user/authenticate"))%></URI>
如何将该行转换为放置在RAZOR视图中?
我的尝试......
<URI>@new Uri(Request.Url,
Response.ApplyAppPathModifier("/user/authenticate"))</URI>
谢谢
答案 0 :(得分:3)
<URI>@(new Uri(Request.Url, Response.ApplyAppPathModifier("/user/authenticate")))</URI>
应该有用。