Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

29 lines
662 B
Plaintext

<%@ Page Language="C#" %>
<html>
<script runat=server>
void Page_Load ()
{
if (!IsPostBack)
return;
HttpFileCollection Files = Request.Files;
string [] names = Files.AllKeys;
for (int i = 0; i < names.Length; i++) {
Files [i].SaveAs ("FILE" + i);
}
}
</script>
<title>HtmlInputFile</title>
<body>
This should save the file you upload in the server as 'FILE0'. <br/>
<form id="myForm" name="myform" method="post" runat="server">
Pick a file:
<input id="myFile" type="file" runat="server">
<br>
<asp:Button id="btn" Text="Go send it!" runat="server" />
<asp:TextBox Columns="2" MaxLength="3" Text="1" runat="server"/>
</form>
</body>
</html>