Torna al Thread

Imports System Imports System.Web Imports System.IO Partial Class Up Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Image1.Visible = True System.Threading.Thread.Sleep(100) If FileUpload1.HasFile Then Dim myFile As HttpPostedFile myFile = FileUpload1.PostedFile Try Using sr As New StreamReader(myFile.InputStream) Dim line As String Do line = sr.ReadLine() If Not (line Is Nothing) Then 'System.Threading.Thread.Sleep(100) Response.Write(line) End If Loop Until line Is Nothing sr.Close() MsgBox1.Show(" Hotel Manager", " File Caricato con successo", Nothing, New EO.Web.MsgBoxButton("OK")) Image1.Visible = False End Using Catch ex As Exception Console.WriteLine("The file could not be read:") Console.WriteLine(ex.Message) End Try End If End Sub End Class
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5