H
Helixpoint
I upload a file with the following code. Is there a way to check to see if
the file is currently there before I upload?
Dim s1 As String
Dim s2 As String
Dim pos As Integer
s1 = file1.PostedFile.FileName
pos = s1.LastIndexOf("\") + 1
s2 = s1.Substring(pos)
file1.PostedFile.SaveAs("C:\Inetpub\wwwroot\xxxxx\images\machines\" & s2)
file_uploaded.Text = "<strong>" & s2 & " has been uploaded!</strong>"
' Add a new userRole to the database
Dim MachID = Session("selectedMachineID")
Dim admin As New ASPNETProduct.machinedb
admin.AddMachImage(MachID, s2)
--
______________________
David Fetrow
HelixPoint LLC.
http://www.helixpoint.com
(e-mail address removed)
Interested in Affordable Email Marketing?
Check out the HelixMailer at http://www.helixpoint.com/helixmailer.asp
If you are interested in becoming a Reseller of HelixPoint products, contact
(e-mail address removed)
______________________
the file is currently there before I upload?
Dim s1 As String
Dim s2 As String
Dim pos As Integer
s1 = file1.PostedFile.FileName
pos = s1.LastIndexOf("\") + 1
s2 = s1.Substring(pos)
file1.PostedFile.SaveAs("C:\Inetpub\wwwroot\xxxxx\images\machines\" & s2)
file_uploaded.Text = "<strong>" & s2 & " has been uploaded!</strong>"
' Add a new userRole to the database
Dim MachID = Session("selectedMachineID")
Dim admin As New ASPNETProduct.machinedb
admin.AddMachImage(MachID, s2)
--
______________________
David Fetrow
HelixPoint LLC.
http://www.helixpoint.com
(e-mail address removed)
Interested in Affordable Email Marketing?
Check out the HelixMailer at http://www.helixpoint.com/helixmailer.asp
If you are interested in becoming a Reseller of HelixPoint products, contact
(e-mail address removed)
______________________