Já consegui rodar um search engine e um forum, nesse brinkster, mas nao consigo fazer rodar o upload e jah tentei vários.







Posted 16/01/2003, 01:04
Posted 16/01/2003, 02:29
Posted 16/01/2003, 10:53
Posted 16/01/2003, 12:51
Posted 16/01/2003, 15:43
<script language="VB" runat="server"> Sub Upload( Sender As Object, e As System.EventArgs ) Dim sPath as String Dim sFile as String Dim colFiles As System.Web.HttpFileCollection Dim i As System.Int32 sPath = Server.MapPath(".") If Right(sPath, 1) <> "\" then sPath = sPath & "\" msg.Text="" colFiles = System.Web.HttpContext.Current.Request.Files Try For i = 0 To colFiles.Count - 1 sFile = System.IO.Path.GetFileName( colFiles(i).FileName ) If sFile <> "" then colFiles(i).SaveAs( sPath & sFile ) msg.Text = msg.Text & "<br>" & sFile & " - <font color=red>Salvo</font>" End If Next Catch Ex as Exception msg.Text = msg.Text & "<br>???? " & sFile & " ??,?????: " & Ex.Message End Try If msg.Text = "" then msg.Text = "<br> - Salvo" End Sub </script> <html> <head> <title>Multiple File Upload Example</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body> <form enctype="multipart/form-data" runat=server> <table border="0" cellspacing="0" cellpadding="4" style='border:1 solid #4358BE'> <tr> <td style='border-bottom:1 solid #4358BE;background-color:#7a96df;color:white'><b>????</b></td> </tr> <tr> <td><input id="file1" type=file runat=server><br> <input id="file2" type=file runat=server><br> <input id="file3" type=file runat=server><br> </td> </tr> <tr> <td align=right><asp:button id=Uploadbtn Text="Enviar" OnClick="Upload" width="70px" height="20px" runat=server/></td> </tr> </table> <asp:label id="msg" Font-Bold="True" runat=server/> </form> </body> </html>
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)