<%@ Page language="c#" Codebehind="ChangeUploadEnvironment.aspx.cs" AutoEventWireup="True" Inherits="EAUploadExamples.ChangeUploadEnvironment" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Chanche upload environmet on the runtime</title>
<link rel="stylesheet" href="ExamplesStyle.css">
<script type="text/javascript" src="JSCore.js"></script>
<script type="text/javascript">
// Get an unique identifier that was used for creating an Upload class instance.
var UploadId = '<% = UploadIdentifier %>';
function doUpload(formObj)
{
// Add an unique identifier to query string. EAUpload retrieves this value and
// uses it as an unique identifier of an Upload class instance. So, now we can get an access
// to required Upload object by this id from any page within the application.
// Function "RefreshQueryString" is defined in JSCore.js file.
formObj.action = RefreshQueryString(formObj.action, UploadId);
return true;
}
</script>
</HEAD>
<body>
This example demonstrates how to preset a specific environment for the single
upload process.
<br />
<br />
Presetted parameters for expected upload:
<br />
Maximum request size: 10240 KB (10MB);
<br />
Allowed file types: .jpg, .jpeg, .gif, .png;
<br />
<br />
<form id="Form1" method="post" runat="server" enctype="multipart/form-data" onsubmit="return doUpload(this);">
<table style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none">
<tbody>
<tr>
<td>
<input type="file" name="UploadingFile1" size="40">
</td>
</tr>
<tr>
<td>
<input type="file" name="UploadingFile2" size="40">
</td>
</tr>
<tr>
<td>
<input type="file" name="UploadingFile3" size="40">
</td>
</tr>
<tr>
<td align="right">
<br />
<asp:Button id="Button1" runat="server" Width="80px" Text="Upload" onclick="Button1_Click"></asp:Button>
</td>
</tr>
</tbody>
</table>
<br />
<asp:Label id="lblResponse" runat="server"></asp:Label>
</form>
<hr />
<a target="_blank" href="http://www.easyalgo.com/quickstart/util/srcview.aspx?path=/Examples/EAUpload/ChangeUploadEnvironment.src">View C Sharp source code</a>
<a target="_blank" href="http://www.easyalgo.com/quickstart/util/srcview.aspx?path=/Examples/EAUpload/VBNET/ChangeUploadEnvironment.src">View VB NET source code</a>
</body>
</HTML>