龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > asp.net编程 >

ASP.NET文件上传实例之ASP.NET+Flash实现多文件上传例子(2)

时间:2009-12-21 11:47来源:未知 作者:admin 点击:
分享到:
后台 Code [http://www.xueit.com] if (Request.Files.Count != 0 ){ HttpFileCollection fc = Request.Files; for ( int i = 0 ; i fc.Count; i ) { try { object s = fc[i]; System.Web.HttpPostedFile pf = (Sy

后台 Code [http://www.xueit.com]
if (Request.Files.Count != 0)
{
    HttpFileCollection fc = Request.Files;

    for (int i = 0; i < fc.Count; i  )
    {
        try
        {
            object s = fc[i];
            System.Web.HttpPostedFile pf = (System.Web.HttpPostedFile)s;
            pf.SaveAs(Server.MapPath("pic/"   pf.FileName));
            //Image img=new Image( );
            //img.ImageUrl = Server.MapPath("pic/"   pf.FileName);
            //img.Width
            //Response.Write("{"width":"10249","height":"51","mime":"42.4000"}");
            Response.Write("{"status":"1","name":"","hash":"","width":250,"height":12,"mime":"image"}");
        }
        catch
        {
            Response.Write("{"status":"1","name":"","hash":"","width":250,"height":12,"mime":"image"}");
        }
    }
}
else
{
    string s = "something wrong";
}

下面是效果图:

 

 

 


精彩图集

赞助商链接