- 浏览: 1648428 次
- 性别:
- 来自: 福州
文章分类
- 全部博客 (583)
- strust2.0 (14)
- hibernate2.0 (5)
- java (13)
- javaScript (59)
- AJAX (8)
- TFS (6)
- 其它 (20)
- CSS (23)
- asp (18)
- Dojo (5)
- 项目管理 (3)
- SQLServer (25)
- oracle (26)
- .NET (221)
- 开源系统 (6)
- 常识 (41)
- 软件架构 (1)
- My SQL (1)
- SilverLight (10)
- Flex (1)
- window7 (1)
- 网络安全 (2)
- CMS (1)
- ECShop (4)
- 邮件系统 (9)
- Linq (0)
- 淘宝店铺经营宝典 (0)
- flash插件 (1)
- Hubble.net全文检索 (1)
- 在线编辑器 (1)
- 正则表达式 (1)
- 创业 (1)
- asp.net mvc (1)
- 全文检索 (0)
- 全文检索 HubbleDotNet (1)
- Android (27)
- TFS bin (1)
最新评论
-
z小小Jean:
有具体的解决方法吗
用命名imp导入DMP时报无法解析指定的连接标识符的解决办法 -
njoiop:
这些都是常用接口,IP地址、手机归属和身份证查询接口,基站定位 ...
IP地址、手机归属和身份证查询接口 -
Fs_sky:
那导出DMP如何包含序列等其他东西?
在plsql中如何导出dmp文件 -
qiywtc:
请问该怎么判断视频的格式再选择对应的播放格式来播放啊?
asp.net各种类型视频播放代码(全) -
xinghenhouzi:
楼主说的版本不同无法导入导出是什么意思?我用10g的exp.e ...
在plsql中如何导出dmp文件
AspnetUpload™ is an ASP.NET HttpModule that make your web application to upload large file(s) to your web server with realtime progress indicator and no client software or control installation needed. To use this httpmodule in your web application, follow these steps:
Copy Bestcomy.Web.Controls.Upload.dll to your project bin folder.
In your project, under the Project menu, select the "Add Reference..." option. Use the Browse button to find Bestcomy.Web.Controls.Upload.dll, and click OK. This will include all the functionality of AspnetUpload™ into your project.
In your project web.config, which located root of your web application. Add a line in the httpModules section of web.config like this:
<httpModules>
<add name="UploadModule" type="Bestcomy.Web.Controls.Upload.UploadModule,Bestcomy.Web.Controls.Upload" />
</httpModules>
In the same web.config, beneath configuration tag directly, add AspnetUpload™ configuration settings like this:
<configSections>
<section name="aspnetUploadSettings" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.5000.0, Culture=neutral,PublicKeyToken=b77a5c561934e089" />
</configSections>
<aspnetUploadSettings>
<!--
Key Name: lisenceKey
Valid Value: Purchased lisence key from the control author.
-->
<add key="lisenceKey" value="Lisence key purchase from www.aspnetupload.net" />
<!--
Key Name: maxRequestLength
Valid Value: KBytes size of maximum upload file length to accept
-->
<add key="maxRequestLength" value="409600" />
</aspnetUploadSettings>
In your webform's client side(somename.aspx), which needs upload function, add enctype="multipart/form-data" to the form tag like this:
<form id="Form1" method="post" enctype="multipart/form-data" runat="server">
Add html file control in your webform's client side like this:
<input type="file" name="file1">
please do not use runat="server" attribute in this html file control.
Add a using Bestcomy.Web.Controls.Upload; entry to the form code.
Add following code to into Page_Load method:
AspnetUpload upldr = new AspnetUpload();
upldr.RegisterModelessProgressBar("ProgressBar.aspx",btn_upload);
string fpath = Path.Combine(Server.MapPath("."),"Upload");
if(!Directory.Exists(fpath))
Directory.CreateDirectory(fpath);
upldr.set_UploadFolder(fpath);
Above code needs adding a using System.IO; entry to the form code, because above code use some file operation.
You can use following code to get the uploaded file and save it to the destination folder:
AspnetUpload upldr = new AspnetUpload();
UploadFile file = upldr.GetUploadFile("file1");
if(file != null)
{
string fpath = Path.Combine(Server.MapPath("."),"Upload");
fpath = Path.Combine(fpath,Path.GetFileName(file.get_FileName()));
file.SaveAs(fpath);
}
原文连接:http://blog.csdn.net/wang102010/archive/2007/05/02/1594815.aspx
Copy Bestcomy.Web.Controls.Upload.dll to your project bin folder.
In your project, under the Project menu, select the "Add Reference..." option. Use the Browse button to find Bestcomy.Web.Controls.Upload.dll, and click OK. This will include all the functionality of AspnetUpload™ into your project.
In your project web.config, which located root of your web application. Add a line in the httpModules section of web.config like this:
<httpModules>
<add name="UploadModule" type="Bestcomy.Web.Controls.Upload.UploadModule,Bestcomy.Web.Controls.Upload" />
</httpModules>
In the same web.config, beneath configuration tag directly, add AspnetUpload™ configuration settings like this:
<configSections>
<section name="aspnetUploadSettings" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.5000.0, Culture=neutral,PublicKeyToken=b77a5c561934e089" />
</configSections>
<aspnetUploadSettings>
<!--
Key Name: lisenceKey
Valid Value: Purchased lisence key from the control author.
-->
<add key="lisenceKey" value="Lisence key purchase from www.aspnetupload.net" />
<!--
Key Name: maxRequestLength
Valid Value: KBytes size of maximum upload file length to accept
-->
<add key="maxRequestLength" value="409600" />
</aspnetUploadSettings>
In your webform's client side(somename.aspx), which needs upload function, add enctype="multipart/form-data" to the form tag like this:
<form id="Form1" method="post" enctype="multipart/form-data" runat="server">
Add html file control in your webform's client side like this:
<input type="file" name="file1">
please do not use runat="server" attribute in this html file control.
Add a using Bestcomy.Web.Controls.Upload; entry to the form code.
Add following code to into Page_Load method:
AspnetUpload upldr = new AspnetUpload();
upldr.RegisterModelessProgressBar("ProgressBar.aspx",btn_upload);
string fpath = Path.Combine(Server.MapPath("."),"Upload");
if(!Directory.Exists(fpath))
Directory.CreateDirectory(fpath);
upldr.set_UploadFolder(fpath);
Above code needs adding a using System.IO; entry to the form code, because above code use some file operation.
You can use following code to get the uploaded file and save it to the destination folder:
AspnetUpload upldr = new AspnetUpload();
UploadFile file = upldr.GetUploadFile("file1");
if(file != null)
{
string fpath = Path.Combine(Server.MapPath("."),"Upload");
fpath = Path.Combine(fpath,Path.GetFileName(file.get_FileName()));
file.SaveAs(fpath);
}
原文连接:http://blog.csdn.net/wang102010/archive/2007/05/02/1594815.aspx
发表评论
-
【转】C#定时执行某个程序
2015-03-16 17:33 726using System; using System. ... -
多行文本框字符数长度验证的解决方案
2012-03-02 16:04 1200在ASP.NET系统中经常会遇到验证文本框长度,比如数据库里是 ... -
【转】asp.net(c#)通过两个点的经纬度计算距离
2012-01-12 14:14 1379原理: 地球赤道上环绕地球一周走一圈共40075.04公里 ... -
【转】GSM手机短信软件的实现(C#)
2011-11-30 13:55 1292http://www.cnblogs.com/Engin/ar ... -
[转]C#开发短信收发软件的原理
2011-11-16 16:44 1647坛子里好像很多人对如何自己用C#开发手机短信有兴趣,正好我也做 ... -
TCPClient 类实现网络互联、通信
2011-10-29 11:16 2939TcpClient 为 TCP 网络服务提供客户端连接。 S ... -
Hubble.Net实现全文检索
2011-07-25 19:30 4027一、 下载安装 到Hubble.net 项目首页 http: ... -
c# 获取当前周第一天、最后一天,当前月第一天、最后一天的实现代码
2011-04-17 18:39 5269获取当前周工作日第一天、最后一天 int dayOfWee ... -
c#通过调用7z.exe实现解压文件
2011-03-05 15:47 47797-Zip 简介 7-Zip 是一款号称有着现今最高压缩比的 ... -
【转】IEnumerable 和 IEnumerator 接口
2011-03-04 17:12 2023类继承关系:public interface IQueryab ... -
【转】C#获取文件的绝对路径
2011-03-04 17:08 2479要在c#中获取路径有好多方法,一般常用的有以下五种: ... -
ListBox之间的数据项的移动操作
2010-09-29 11:04 1551<%@ Page Language="C# ... -
【转】asp.net中URL参数传值中文乱码的三种解决办法
2010-09-21 22:31 3414在做Asp.Net开发的时候,经常会遇到页面乱码的问题,下面是 ... -
【转】ASP.NET文件下载函数
2010-09-21 22:29 1399在你的Page_Load中添加这样的代码: Page.Re ... -
【转】在ASP.NET中实现多文件上传
2010-09-21 22:25 1228在以前的Web应用中,上传文件是个很麻烦的事,现在有了.NET ... -
[转]ASP.NET中常用的文件上传下载方法
2010-09-21 22:23 1811文件的上传下载是我们在实际项目开发过程中经常需要用到的技 ... -
HTML文章中截取摘要的问题[转]
2010-06-09 10:46 1869博客系统通常的做法是,在博客的首页只显示文章的摘要,点击标题进 ... -
获取 asp:Button 控件的的ComandName值的方法
2010-05-22 17:31 1246protected void btn_Save_Click ... -
ASP.NET防止用户多次登录的方法
2010-05-06 12:34 1576常见的处理方法是,在 ... -
使用 Enter 键提交表单
2010-04-27 14:04 1332一、使用 JS 代码 我们在表单里面的 TextBox (as ...
相关推荐
You should ensure that the server's public keys are loaded by the client as described in How to use SFTP (with server validation - known hosts), or you may want to switch off server validation to get ...
paths and layers Build web files Master the basics of Photoshop with the visual examples and easy-to-follow lessons in How to Use Photoshop CS 2. <br> ...
How to use epoll A complete example in C How to use epoll A complete example in C How to use epoll A complete example in C How to use epoll A complete example in C
How to use projector
this article introduces how to use awk in linux
Simple application that shows how to use the Data Control to connect to the Biblio.mdb database and display all authors in the Authors table.
本教程“WebApplication3_how_to_use_face_FacetoFace_”将引导你了解如何在Web应用中集成并使用面对面的面部识别功能。我们将深入探讨相关技术,包括面部检测、特征提取、匹配算法以及在实际Web应用中的实现步骤。 ...
How to use 256 Color Bitmaps in ImageList (Win32 SDK solution)如何在ImageList中使用256色的位图(Win32 SDK的解决方案)(5KB)
He explains the roles of individual objects in a complete application, how they react to events and fulfill service requests, and how to transform excellent designs into excellent code. Using ...
Lists I- How to use lists in Excel 2003.xlt
How to use HttpWebRequest and HttpWebResponsein _NET
this book tell you How to Create a Simple Web Dynpro Application for java,not for ABAP
how to use array in jaba
Sample04-Winforms: How to use OpenCVSharp in a WindowsForms application. Sample05: How to use OpenCVSharp in a WPF application. Sample06: How to use VideoCapture and WebCams. Sample07: How to access ...
Learn how to execute web application penetration testing from end to end Key Features Build an end to end threat model landscape for Web Application Security Gain hands-on experience of using tools ...
Sample04-Winforms: How to use OpenCVSharp in a WindowsForms application. Sample05: How to use OpenCVSharp in a WPF application. Sample06: How to use VideoCapture and WebCams. Sample07: How to access ...
About This Book Learn how to propagate DOM changes across the website without writing extensive jQuery callbacks code. Learn how to achieve ...How to use Vuex to manage global application's state.