我刚刚开始玩Beta,并在那里发现了一些黑魔法。当我看到那个_LoginPartial.cshtml
建立注册链接线只是说:ASP.NET MVC 4和ContextDependentView
@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink", data_dialog_title = "Registration" })
呈现在浏览器上的链接说/Account/Register
。但是,“注册”视图中的表单会根据ViewBag.FormAction
值将该操作呈现为/Account/JsonRegister
。这个值是在哪里设定的?我怀疑这与Register
行动返回的ContextDependentView
有关,但无法完全弄清楚如何或为什么。
有什么想法吗?