AjaxFileUpload MaximumNumberOfFiles不起作用 [英] AjaxFileUpload MaximumNumberOfFiles not working

查看:92
本文介绍了AjaxFileUpload MaximumNumberOfFiles不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我尝试了很多次,但我仍然无法运行 MaximumNumberOfFiles 属性of $ code> AjaxFileUpload 。

无论 MaximumNumberOfFiles 的值(0,1,2,10) ,...),我可以上传我想要的文件...



然后我尝试了演示(其中 MaximumNumberOfFiles 设置为10): AjaxFileUpload演示 [ ^ ]



而且......惊喜!它不会工作更多!



有人可以解释一下我如何限制要上传的文件数量?



谢谢。

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.

推荐答案

你好,

工作正常。请编译好。使用下面的代码测试

并且不要在你的引用中添加AjaxControlToolkit.dll。

on.aspx页面:

Hi there,
its working fine.and please compile it well.use below code for testing
and don''t forgate to add AjaxControlToolkit.dll in your references.
on.aspx page:
<%@ 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不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆