radcontrol radupload 上传控件的学习与使用


1.web.config  中需要加入:
 <httpHandlers>
    <add verb="*" path="Telerik.RadUploadProgressHandler.aspx" type="Telerik.WebControls.RadUploadProgressHandler, RadUpload.Net2" />
 </httpHandlers>
 <httpModules>
      <add name="RadUploadModule" type="Telerik.WebControls.RadUploadHttpModule, RadUpload.Net2" />
 </httpModules>

2.引用并声明使用
<%@ Register TagPrefix="radU" Namespace="Telerik.WebControls" Assembly="RadUpload.NET2" %>
<radU:RadProgressManager ID="Radprogressmanager1" runat="server" />
<radU:RadUpload ID="RadUpload1" runat="server" Skin="Web20" InitialFileInputsCount="2"
                    MaxFileInputsCount="4" AllowedFileExtensions=".doc,.rar" MaxFileSize="10000000"
                    TargetFolder="~/Upload/kjcx" OverwriteExistingFiles="false" />
<asp:Button ID="buttonSubmit" runat="server" CssClass="RadUploadButton" Text="Submit!" />
<radU:RadProgressArea ID="progressArea1" runat="server" />
很多参数的设置参考 :http://www.telerik.com/demos/aspnet/Upload/Examples/Overview/DefaultCS.aspx

3.文件大小的控制,如果太大会出现页面报错。
web.config 
 <httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="8192" requestLengthDiskThreshold="8192" />

报错的帮助文档:
http://www.telerik.com/support/kb/article/b454K-gth-b454T-cee.aspx
http://www.telerik.com/help/radUpload/v2%5FNet2/?UploadingLargeFiles.html





posted @ 2007-11-30 12:04  LeoXu  阅读(2903)  评论(3编辑  收藏  举报
阿里云服务器购买页