本文介绍了AjaxFileUpload MaximumNumberOfFiles不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我尝试了很多次,但我仍然无法运行 MaximumNumberOfFiles
属性of $ code> AjaxFileUpload 。
无论 MaximumNumberOfFiles
的值(0,1,2,10) ,...),我可以上传我想要的文件...
然后我尝试了演示(其中 MaximumNumberOfFiles
设置为10): []
而且......惊喜!它不会工作更多!
有人可以解释一下我如何限制要上传的文件数量?
谢谢。
Hello,
I tried many times, but I still can''t run the MaximumNumberOfFiles
property of AjaxFileUpload
.
Whatever the value of MaximumNumberOfFiles
(0, 1, 2, 10,...), I can upload as files I want...
Then I tried the demo (where MaximumNumberOfFiles
is set to 10) : AjaxFileUpload Demonstration[^]
And...surprise! It doesn''t work more!
Could someone please explain me how can i limit the number of files to upload?
Thanks.
推荐答案
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="SendingMail.WebForm1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body> <asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<form id="form1" runat="server">
<ajaxToolkit:AjaxFileUpload ID="AjaxFileUpload1" ThrobberID="myThrobber"
ContextKeys="fred"
AllowedFileTypes="jpg,jpeg"
MaximumNumberOfFiles=10
runat="server"/>
</form>
</body>
</html>
这篇关于AjaxFileUpload MaximumNumberOfFiles不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!