会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
javawebsoa
CnBlogs
Home
New Post
Contact
Admin
asp.net 上传控件
注册控件: <%@ Register TagPrefix="fup" Namespace="OboutInc.FileUpload" Assembly="FileUpload" %> 调用控件: <form runat="server" id="form1"> <input type="file" name="myFile1" /><br/> <input type="file" name="myFile2" /><br/> <input type="file" name="myFile3" /><br/> <ASP:LinkButton runat="server" text="上传" /> <ASP:LinkButton runat="server" text="取消" onClientClick="Cancel(); return false;" /><br/> <br/> <fup:FileUploadProgress OnClientProgressStopped = "function(){alert('文件已上传');}" OnClientProgressStarted = "Clear" OnClientServerException = "ServerException" ShowUploadedFiles = "true" runat = "server" ID = "uploadProgress" InnerFiles = "true" StyleFile = "fup_styles/myStyle.css" LocalizationFile="fup_localization/en.xml" /> 后台代码: OboutFileCollection files = uploadProgress.Files; for(int i=0; i < files.Count; i++) { OboutPostedFile file = files[i]; file.SaveAs(MapPath("~/Uploaded/"+Path.GetFileName(file.FileName))); }
下载地址 :
点击打开链接
posted @
2011-07-28 13:08
javawebsoa
Views(
239
) Comments(
0
)
Edit
收藏
举报
刷新页面
返回顶部
公告