(转)asp.net2.0 上传大容量文件第三方控件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_Net2/?UploadingLargeFiles.html
以上内容为转载别人的,今天在网上下载了一个上传大容量文件的源码,上面用到了rad这个套控件中的两个,上传了一个400M的文件成功,以后就用这个控件来专门上传大容量的文件了,作为上传大容量文件的一个方案,哈哈!
<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_Net2/?UploadingLargeFiles.html
以上内容为转载别人的,今天在网上下载了一个上传大容量文件的源码,上面用到了rad这个套控件中的两个,上传了一个400M的文件成功,以后就用这个控件来专门上传大容量的文件了,作为上传大容量文件的一个方案,哈哈!