使用ajax mvc在成功html.beginform上创建按钮

时间:2018-02-06 03:10:44

标签: c# jquery asp.net ajax asp.net-mvc

我正在使用C#,MVC,asp.net中的项目,我希望我的表单成功添加一个新按钮。

@using (Ajax.BeginForm("CreatePaper", "AdminPaper", "Post", new AjaxOptions { OnSuccess = "Success" }))
{
   //some fields to complete 
  <button id="submiter" type="submit" class="btn btn-primary">Create</button>
}
@section scripts
{@Scripts.Render("~/bundles/jqueryval")
<script type="text/javascript">
function Success() {
    console.log("test");//did not know how to add the button, maybe I can use ajax?
}
</script>
}

如何在“提交者”按钮旁边添加新按钮?谢谢

注意&gt; 由于某些原因我无法在控制台中看到日志。它没有显示任何东西。

0 个答案:

没有答案