我为 cshtml 编写了一个 html 代码,其中包含两个按钮保存和更新:
<div class="modal-body">
@using (Html.BeginForm("Create", "CustomActivity", FormMethod.Post, new { role = "form", @id = "customActivityForm", @class = "activityForm" }))
{
<div>
<div class="container" id="activity">
@Html.LabelFor(m => m.AdminCustomActivity.Activity, new { @class = "" })
@Html.TextBoxFor(m => m.AdminCustomActivity.Activity, new { @class = "w100p mb0" })
@Html.ValidationMessageFor(m => m.AdminCustomActivity.Activity, "", new { @class = "text-danger" })
</div>
<div class="container">
<div class="column one-fourth">
<div>
@Html.LabelFor(m => m.AdminCustomActivity.Rate, new { @class = "wcrate" })
@Html.TextBoxFor(m => m.AdminCustomActivity.Rate, new { @class = "w100p mb0" })
@Html.ValidationMessageFor(m => m.AdminCustomActivity.Rate, "", new { @class = "text-danger" })
</div>
</div>
</div>
现在在页脚中有两个按钮添加和更新验证非常适合添加按钮但验证不适用于更新按钮因为更新按钮的函数调用来自 jquery
我如何允许在与添加按钮相同的更新按钮中检查验证。我尝试使用type='submit'但那不起作用
元芳怎么了
料青山看我应如是
随时随地看视频慕课网APP
相关分类