求.net文件上传下载代码

[复制链接]
查看11 | 回复5 | 2009-8-12 15:30:24 | 显示全部楼层 |阅读模式
Boolean fileOk = false;
string path = Server.MapPath("~/upload/");
if (FileUpload1.HasFile)
{
//获取扩展名
string fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName).ToLower();
//限定只能上传jpg和gif图片
string[] allowExtension = { ".jpg...
回复

使用道具 举报

千问 | 2009-8-12 15:30:24 | 显示全部楼层
Web.Config...
回复

使用道具 举报

千问 | 2009-8-12 15:30:24 | 显示全部楼层
是b/s 还是 c/s结构?c/s结构这里有一段:使用Tcp/Ip下载文件(图)http://hi.baidu.com/jonnysuen/blog/item/4a0d37545c5d4dcdb745aee8.html...
回复

使用道具 举报

千问 | 2009-8-12 15:30:24 | 显示全部楼层
200M ASP.NET正常的方式是不行的。需要特殊的处理方式这样的大文件不怎么好处理比较占资源...
回复

使用道具 举报

千问 | 2009-8-12 15:30:24 | 显示全部楼层
?.net不是自带了上传下载控件吗?msdn好好读读这个控件啊。fileupload...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行