开发者

Html.ActionLink URL error

开发者 https://www.devze.com 2023-03-03 12:06 出处:网络
return RedirecttoAction(\"Success\") how t开发者_运维百科o generate redirection?You are using the wrong overload of Html.ActionLink, you need
return RedirecttoAction("Success")

how t开发者_运维百科o generate redirection?


You are using the wrong overload of Html.ActionLink, you need

<%: Html.ActionLink("linkText", "actionName", "controllerName") %>

Without the third controllerName parameter it will default to the current controller which appears to be in this case your UserController when I expect you want to direct to the AccountController. That is why the ActionLink works in your other view.

0

精彩评论

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