New test.
[mono.git] / mcs / class / System.Web / Test / standalone / htmlinputfile / htmlinputfile.aspx
1 <%@ Page Language="C#" %>
2 <html>
3 <script runat=server>
4         void Page_Load ()
5         {
6                 if (!IsPostBack)
7                         return;
8
9                 HttpFileCollection Files = Request.Files;
10                 string [] names = Files.AllKeys;
11                 for (int i = 0; i < names.Length; i++) {
12                         Files [i].SaveAs ("FILE" + i);
13                 }
14         }
15 </script>
16 <title>HtmlInputFile</title>
17 <body>
18 This should save the file you upload in the server as 'FILE0'. <br/>
19 <form id="myForm" name="myform" method="post" runat="server">
20 Pick a file:
21 <input id="myFile" type="file" runat="server"> 
22 <br>
23 <asp:Button id="btn" Text="Go send it!" runat="server" />
24 <asp:TextBox Columns="2" MaxLength="3" Text="1" runat="server"/>
25 </form>
26 </body>
27 </html>
28