开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜