最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
jquery uploadify插件实现上传文件进度条效果
时间:2022-06-25 17:45:25 编辑:袖梨 来源:一聚教程网
一、jquery进度条代码:
css" rel="stylesheet" type="text/css" />
|
二、后端程序代码,产生jquery进度条的数据源:
using System;
using System.Web;
using System.IO;
public class UploadHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Charset = "utf-8";
HttpPostedFile file = context.Request.Files["Filedata"];
string uploadPath = HttpContext.Current.Server.MapPath(@context.Request["folder"]);
if (file != null)
{
if (!Directory.Exists(uploadPath))
{
Directory.CreateDirectory(uploadPath);
}
file.SaveAs(Path.Combine(uploadPath, file.FileName));
context.Response.Write("1");
}
else
{
context.Response.Write("0");
}
}
public bool IsReusable
{
get
{
return false;
}
}
}
相关文章
- jm漫画-在线观看最新入口 02-28
- Deepseek网页版免费入口-deepseek在线极速体验 02-28
- 哔咔-picacg核心区别 02-28
- 歪歪漫画-免费看歪歪漫画 02-28
- z-libirary软件-强大功能与独特特点 02-28
- 漫蛙manwa2最新版本下载官方正版入口-下载安装教程及常见问题解答 02-28