我正在使用以下 Razor 代码:
@using (Html.BeginForm("action", "controller", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form", @id = "registerForm", data_href = "/User/Account/Register" }))
{
....
}
这会产生:
<form action="/User/Account/Register" class="form" data-href="/User/Account/Register" id="registerForm" method="post" novalidate="novalidate">
我在生成的代码中没有看到任何对 ReturnUrl 的引用。有人可以解释这是作为 HTML 的一部分存储的吗?