相关疑难解决方法(0)

在多个表单上指定验证摘要

我在页面上有两个表单如下:

@using (Html.BeginForm())
{
    @Html.ValidationSummary()
    @Html.Label("code", "Confirmation Code")
    @Html.TextBox("code")
    <input type="submit" value="Go" />
}
@using (Html.BeginForm("SendConfirmation", "Auth"))
{
    @Html.ValidationSummary()
    @Html.Label("email", "Email")
    @Html.TextBox("email")
    <input type="submit" value="Resend" />
}
Run Code Online (Sandbox Code Playgroud)

如果SendConfirmation抛出错误,则显示2个验证摘要.如何获得验证摘要以定位自己的?

asp.net-mvc asp.net-mvc-3

28
推荐指数
2
解决办法
8844
查看次数

标签 统计

asp.net-mvc ×1

asp.net-mvc-3 ×1