Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click If FileUpload1.HasFile Then Try Dim fileName As String = System.Guid.NewGuid.ToString + ".tmp" FileUpload1.SaveAs("C:\Windows\Temp" & fileName) Label1.Text = "File name: " & FileUpload1.PostedFile.FileName & "<br>" & _ "Saved name: " & fileName & "<br />" & _ "File Size: " & FileUpload1.PostedFile.ContentLength & " kb<br>" & _ "Content type: " & FileUpload1.PostedFile.ContentType If FileUpload1.PostedFile.ContentLength < 10000 Then Dim objReader As System.IO.StreamReader = New System.IO.StreamReader(FileUpload1.PostedFile.InputStream) Dim data As String = objReader.ReadToEnd Label2.Text = data Else Label1.Text = "ERROR: The size of the file you uploaded is grater than 10kb." Label2.Text = "" End If Catch ex As Exception Label1.Text = "ERROR: " & ex.Message.ToString() Label2.Text = "" End Try Else Label1.Text = "ERROR: You have not specified a file." Label2.Text = "" End If End Sub End Class
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.