|
Тема |
Изтриване на файл |
|
Автор | tester (Нерегистриран) | |
Публикувано | 07.03.07 10:09 |
|
|
Имам следния код ан ASP но въобще не работи изтриването аз аз нес съм се занимавал досга с ASP а трябва да го оправя. Ще съм много благодарен ако някой може да ми помогне.
Благодаря предварително.
Dim theDate As DateTime
Dim strDate as string = theDate.Now.Day.ToString() & theDate.Now.Month.ToString() & theDate.Now.Year.ToString() & theDate.Now.Hour.ToString() & theDate.Now.Minute.ToString() & theDate.Now.Second.ToString() & theDate.Now.Millisecond.ToString() & "-"
Dim fName As String = Path.GetFileName(theSnimka.PostedFile.FileName)
Dim strFile as string
if fName.Length > 0 then
strFile = strPath & strDate & fName
theSnimka.PostedFile.SaveAs(strFile)
else
fName = ""
end if
...
...
...
if fName.Length > 0 then
File.Delete(MapPath(".") & "\" & fName)
end if
|
| |
|
|
|