获取文件名
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Not (aa.PostedFile Is Nothing) Then
Dim nam As String = aa.PostedFile.FileName
Dim i As Integer = nam.LastIndexOf(".")
Dim newext As String = nam.Substring(i)
newext = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString + DateTime.Now.Day.ToString + DateTime.Now.Hour.ToString + DateTime.Now.Minute.ToString + DateTime.Now.Second.ToString + newext
' Response.Write(newext)
Response.Write(aa.PostedFile.FileName)
Response.Write("<BR>")
aa.PostedFile.SaveAs(Server.MapPath("~/IMAGES/" & newext))
End If
End Sub