如何做一个ASP.NET MVC Ajax表单与multipart/form-data?

我正在开发一个ASP.NET MVC网站,它具有允许使用表单标签上的multipart / form数据enctype选项上传文件的形式,如
<form enctype="multipart/form-data" method="post" action='<%= Url.Action("Post","Entries",new {id=ViewData.Model.MemberDetermination.DeterminationMemberID})  %>'>

我该如何写这个ASP.NET MVC Ajax表单?

解决方法

>您可以使用一些其他上传者(例如 jQuery multiple file uploader)(我喜欢这种方式,我更喜欢不使用MS Ajax)
>使用:
AjaxHelper.BeginForm("Post",new {id=ViewData.Model.MemberDetermination.DeterminationMemberID},new AjaxOptions(){/*some options*/},new {enctype="multipart/form-data"})

但是在第二种情况下,我不确定它会奏效。

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....