我在 mvc 项目中使用 kendo ui 文件上传。删除文件不确认,我想在删除前确认
@(Html.Kendo().Upload()
.Name("attachments")
.TemplateId("fileTemplate")
.Async(async => async.Save("SaveFile", "Upload", new { folderType = ViewBag.FolderType, recordid = ViewBag.TableXRef })
.Remove("RemoveFile", "Upload")
.AutoUpload(true))
.Files(files =>
{
foreach (var f in Model.OrderByDescending(f => f.ModifyDate))
{
files.Add().Name(f.FileName.ToString())
.Extension(f.Extension).Size(f.Size);
}
})
)
<script id="fileTemplate" type="text/x-kendo-template">
<div>
<span class="k-filename">"#=name#"</span>
<p> <a href='javascript:downloadAttachments("#=name#")' >#=name#</a> </p>
<button id='btnDelete' type='button' class='k-upload-action' style='position: absolute; top: 0; right: 0;'>
</button>
</div>
</script>