Binding HttpPostedFileBase using Ajax.BeginForm

前端 未结 4 560
星月不相逢
星月不相逢 2020-12-03 19:16

I have a form which binds a model and a file upload using the default binder for HttpPostedFileBase.

This works fine when using Html.BeginForm(). However, I wanted t

4条回答
  •  长情又很酷
    2020-12-03 19:52

    Yes I also agree. You can definately upload files using 'Ajax.BeginForm'.Add 'enctype = "multipart/form-data"' to the AjaxOptions object.

提交回复
热议问题