<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UploadMultipleFiles.aspx.cs" Inherits="EAUploadExamples.UploadMultipleFiles" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Upload multiple files via Flash Uploader.</title>
<link rel="stylesheet" href="ExamplesStyle.css">
<style type="text/css">
#responseContainer
{
overflow: auto;
width: 390px;
height: 250px;
border: 1px solid #cccccc;
background-color: #ffffff;
}
</style>
<!-- Embedding the EAFlashUpload control -->
<script type="text/javascript" src="swfcore/swfobject.js"></script>
<script type="text/javascript">
var params = {
BGcolor: "#ffffff",
wmode: "window"
};
// id and name attribute may contain any value.
// You need to use specified below identifier to access to the EAFlashUpload methods and properties.
var attributes = {
id: "FlashUploader",
name: "FlashUploader"
};
var flashvars = new Object();
// In IE and non-IE browsers Flash resolves relative path differently if page with EAFlashUpload is placed to different directory than swf files. If you place EAFlashUpload files and container page in the same directory then above problem doesn't appear.
// Below code detect non-IE browsers and chenge url to script.
var uploadUrl = "UploadMultipleFiles.aspx";
if(!document.all)
{
uploadUrl = "../" + uploadUrl;
}
flashvars["uploader.uploadUrl"] = uploadUrl; // you should specify an appropriate URL of script that will receive files.
flashvars["viewFile"] = "swfcore/TableView.swf";
swfobject.embedSWF("swfcore/EAFUpload.swf", "EAFlashUpload_holder", "450", "350", "9.0.0", "swfcore/expressInstall.swf", flashvars, params, attributes);
// Handles EAFlashUpload's onMovieLoad event and displays existing loading errors.
function FlashUploader_onMovieLoad(errors)
{
if(errors != "")
alert(errors);
}
function FlashUploader_onFileLoadEnd(fileObj)
{
var htmlCode = fileObj.serverResponse;
var rContainer = document.getElementById("responseContainer");
rContainer.innerHTML += "<br />" + htmlCode + "<br /><hr />";
}
function clearList()
{
var rContainer = document.getElementById("responseContainer");
rContainer.innerHTML = "";
}
</script>
</HEAD>
<body>
This example demonstrates how to upload multiple file via EAFlashUpload uploader.
<br />
EAFlashUpload it is other our product. It allows upload multiple files at once without page reload.
<br />
You can find more information about this component here <a href="../../eaflashupload.aspx">EAFlashUpload overview</a>
<br />
<br />
<form id="Form1" runat="server" >
<table>
<tr>
<td>
<div id="EAFlashUpload_holder">
You need at least Adobe Flash Player 9 for successful work. Download the latest version from here:
<br />
<a href="http://www.adobe.com/support/flashplayer/downloads.html">Adobe Flash Player</a>
</div>
</td>
<td style="padding-left: 40px; vertical-align: top;">
Server response:<br />
<div id="responseContainer"></div>
<a href="javascript:clearList();">Clear list</a>
</td>
</tr>
</table>
</form>
<hr />
<a target="_blank" href="http://www.easyalgo.com/quickstart/util/srcview.aspx?path=/Examples/EAUpload/UploadMultipleFiles.src">View C Sharp source code</a>
<a target="_blank" href="http://www.easyalgo.com/quickstart/util/srcview.aspx?path=/Examples/EAUpload/VBNET/UploadMultipleFiles.src">View VB NET source code</a>
</body>
</HTML>