Detailed explanation of the use of JQuery.uploadify upload file plug-in for ASP.NET_jquery
WBOY
Release: 2016-05-16 18:36:04
Original
1216 people have browsed it
Later, a friend recommended an upload plug-in called uploadify. It seemed to be very good, so I downloaded a sample from the official website and ran it. It felt very good. I just beautified it a little and it was OK...!
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.IO; namespace WebApplication2 { public partial class Upload : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { HttpPostedFile file = Request.Files["FileData"]; string uploadpath = Server.MapPath(Request["folder"] "\"); if (file != null) { if (!Directory.Exists(uploadpath)) { Directory.CreateDirectory(uploadpath); } file.SaveAs(uploadpath file.FileName); Response.Write("1"); } else { Response.Write("0"); } } } }
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn