Get file name Private sub button1_click (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.toTString DateTime.now.second.write (newext)
Response.write (aa.postedfile.filename) Response.write ("
")
Aa.postedFile.saveas (Server.MAppath ("~ / images /" & new) end if End Sub