Convert ASPX line to Razor line
New to MVC...
The following line is in a sample code I found and is contained in an ASPX page.
<URI><%=new Uri(Request.Url,
Response.ApplyAppPathModifier("~/user/authenticate"))%></URI>
How would that line be converted 开发者_如何学运维to be placed in a RAZOR view?
My attempt...
<URI>@new Uri(Request.Url,
Response.ApplyAppPathModifier("/user/authenticate"))</URI>
thank you
<URI>@(new Uri(Request.Url, Response.ApplyAppPathModifier("/user/authenticate")))</URI>
should work.
精彩评论