Live MultiUpload Demo
The SharpPieces Upload control allows you to upload multiple files in one upload.
Easy to setup, is server independent, completely styleable via CSS and XHTML.
Based on the FancyUpload implmentation of digitarald.de.
<%@ Page Language="C#" MasterPageFile="~/Demo.master" AutoEventWireup="true"
Inherits="SharpPieces.DemoApp.uploadfunctionality"
CodeBehind="uploadfunctionality.aspx.cs" %>
<asp:Content ID="head" runat="server" ContentPlaceHolderID="headPlaceHolder">
<title>SharpPieces - Live MultiUpload Demo - Live Demo</title>
</asp:Content>
<asp:Content ID="descr" runat="server" ContentPlaceHolderID="descriptionPlaceholder">
<h1>Live MultiUpload Demo</h1>
<p>The SharpPieces Upload control allows you to upload multiple files in one upload.
Easy to setup, is server independent, completely styleable via CSS and XHTML.
Based on the FancyUpload implmentation of digitarald.de.</p>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="demoPlaceholder" Runat="Server">
Select the files you wish to upload with the 'Browse' button. When you're ready, 'Upload' them.
<piece:Upload CustomSWFPath="../../Swiff.Uploader.swf"
runat="server"
ID="fancyUpload2"
OnFileReceived="upload_FileReceived"
/>
</asp:Content>
using SharpPieces.Web.Controls;
using System;
using System.Web.UI;
namespace SharpPieces.DemoApp
{
public partial class uploadfunctionality : Page
{
/// <summary>
/// Handles the FileReceived event of the upload control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="SharpPieces.Web.Controls.UploadEventArgs"/>
/// instance containing the event data.</param>
protected void upload_FileReceived(object sender, UploadEventArgs e)
{
if (e.File != null)
{
string savePath = Server.MapPath("App_Temp");
// Due to security issues, the save action itself is blocked in this demo.
//e.File.SaveAs(savePath + "\\" + e.File.FileName);
}
}
}
}