3

您能否建议您如何只允许在 kendo ui 上传中上传 1 个文档。如果文件已被选中,则我们无法上传新文件。请在下面找到代码。谢谢

<div class="configuration k-widget k-header">
    <span class="infoHead">Information</span>
    <p>
        The Upload can be used as a drop-in replacement
        for file input elements.
    </p>
    <p>
        This "synchronous" mode does not require
        special handling on the server.
    </p>
</div>
<form method="post" action='@Url.Action("Submit")' style="width:45%">
    <div>
        @(Html.Kendo().Upload()
            .Name("files")
        )
        <p>
            <input type="submit" value="Submit" class="k-button" />
        </p>
    </div>
</form>
4

2 回答 2

4

参见 Kendo.MVC.UI.Fluent Doc's for Multiple(System.Boolean)

@(Html.Kendo().Upload()
            .Name("files")
            .Multiple(false)
        ) 
于 2013-02-19T03:39:21.077 回答
1

如果您使用的是 javascript/html5 版本:

$("#selctor").kendoUpload({ "multiple": false });
于 2016-07-30T13:52:39.930 回答