Url helper for full url in asp.net mvc-3

前端 未结 4 1786
离开以前
离开以前 2021-02-07 01:52

Writing

@Url.Content(\"~/Something/Something.html\")

in razor renders

/AppFolder/Something/Something.html

I

4条回答
  •  萌比男神i
    2021-02-07 02:30

    See this blog post for the answer.

    Basically, all you need to do it include the protocol parameter e.g.

    Url.Action("About", "Home", null, "http")
    

提交回复
热议问题