开发者

Html.ActionLink URL error

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜