无论如何使用Ajax.Beginform与fluentbootstrap!?

时间:2017-01-11 14:17:23

标签: fluentbootstrap

我正在使用Fluent bootstrap,我想使用像Ajax Begin表单这样的东西,但它不能识别流利的助手....

我怎样才能改变这种形式:

  using (var form = Html.Bootstrap().Form().Begin())
                         {
                            @Html.AntiForgeryToken()
                            @Html.ValidationSummary(true)
                            @form.InputFor(p => p.UniversityTypeCode, FormInputType.Number)
                            @form.InputFor(p => p.UniversityTypeTitle, FormInputType.Text)
                            @form.Submit(CoreMessages.Submit)
                         }

是这样的:

 @using (Ajax.BeginForm("CreateAjax", "UniversityType", new AjaxOptions() { OnComplete = "FormOnComplete", HttpMethod = "Post" }))
                     { // helper here }

1 个答案:

答案 0 :(得分:0)

这项工作对我来说......

 using (Ajax.BeginForm("EditAjax", "HealthcareInstituteType", new AjaxOptions() { OnComplete = "FormOnComplete", HttpMethod = "Post" }))
            {
                using (var form = Html.Bootstrap().Form().Begin())
                {
                    @Html.AntiForgeryToken()
                    @Html.ValidationSummary(true)
                    @form.HiddenFor(p => p.HCITypeCode)
                    @form.InputFor(p => p.HCITypeTitle, FormInputType.Text)
                    @form.TextAreaFor(p => p.HCITypeDescription)

                    <div class="modal-footer text-align-left">
                        <button type="submit" id="approve-btn" class="btn btn-success btn-xs">@CoreMessages.Save</button>
                        <button type="button" class="btn btn-xs btn-danger" data-dismiss="modal">بستن</button>
                    </div>
                }
            }