cioa,
vi riassumo in 2 parole quello che mi è successo.
Prima utilizzavo questo codice per salvare i file su server
questo codice su server 2000 non funziona generandomi l'errore "The given path's format is not supported."codice:Dim filename As String s() As String = Split(inputFile.PostedFile.FileName, "\") filename = s(s.Length - 1) 'creo una stringa per non confondere i vari nomi. Dim ora, APP As String ora = FormatDateTime(Now(), 0) APP = ora.Replace("/", Nothing) APP = APP.Replace(".", Nothing) APP = APP.Replace(" ", Nothing) 'se è tutto ok, salvo l'immagine inputFile.PostedFile.SaveAs(FileType + APP + filename)
ora cambiando in:
funziona, secondo voi che differenza c'è?codice:Dim APP, ora As String ora = FormatDateTime(Now(), 2) APP = ora.Replace("/", Nothing) APP = APP.Replace(".", Nothing) APP = APP.Replace(" ", Nothing) Dim filename As String = inputFile.PostedFile.FileName Dim lastSlash As Integer = filename.LastIndexOf("\") filename = APP & filename.Substring(lastSlash + 1) inputFile.PostedFile.SaveAs(FileType + filename)
ciao

Rispondi quotando