@Html.ActionLink returning a parameterised hyperlink

后端 未结 2 634
傲寒
傲寒 2020-12-22 01:27

I am calling:

@Html.ActionLink(\"Register\", \"Register\", \"Account\", new {area=\"FrontEnd\"})

expecting

www.example.com         


        
相关标签:
2条回答
  • 2020-12-22 01:41

    Try the below. I think you're missing an attribute null at the end

    @Html.ActionLink("Register", "Register", "Account", new {area="FrontEnd"}, null)
    
    0 讨论(0)
  • 2020-12-22 01:47

    You need to add null for the 5th parameter (html attributes)

    @Html.ActionLink("Register", "Register", "Account", new {area="FrontEnd"}, null)
    
    0 讨论(0)
提交回复
热议问题