Posted Date :- 17 feb 2008
Hello to everybody,
I am very thankful to "the scripts" contributors. Their answers are really useful to me.
Now i have a Question
I am storing a image in webserver normally in c:\inetpub\wwwr oot\picture
folder
In case i know how to insert a image in webser.. by the following code.
If Not (myfile.PostedF ile Is Nothing) Then
Dim intFileNameLeng th As Integer
Dim strFileNamePath As String
Dim strFileNameOnly As String
'Logic to find the FileName (excluding the path)
strFileNamePath = myfile.PostedFi le.FileName
intFileNameLeng th = InStr(1, StrReverse(strF ileNamePath), "\")
strFileNameOnly = Mid(strFileName Path, (Len(strFileNam ePath) - intFileNameLeng th) + 2)
If strFileNameOnly = "" Then
Lab.Text = "You Must Choose a Picture"
Exit Sub
End If
myfile.PostedFi le.SaveAs("c:\i netpub\wwwroot\ Picture\" & strFileNameOnly )
path = "http://localhost/Picture/" & strFileNameOnly
End If
But I dont know how to delete a image in the webserver,
if anybody Knows Pl reply to me...
Waiting for Ur Reply.......... ..............
Davidson
Hello to everybody,
I am very thankful to "the scripts" contributors. Their answers are really useful to me.
Now i have a Question
I am storing a image in webserver normally in c:\inetpub\wwwr oot\picture
folder
In case i know how to insert a image in webser.. by the following code.
If Not (myfile.PostedF ile Is Nothing) Then
Dim intFileNameLeng th As Integer
Dim strFileNamePath As String
Dim strFileNameOnly As String
'Logic to find the FileName (excluding the path)
strFileNamePath = myfile.PostedFi le.FileName
intFileNameLeng th = InStr(1, StrReverse(strF ileNamePath), "\")
strFileNameOnly = Mid(strFileName Path, (Len(strFileNam ePath) - intFileNameLeng th) + 2)
If strFileNameOnly = "" Then
Lab.Text = "You Must Choose a Picture"
Exit Sub
End If
myfile.PostedFi le.SaveAs("c:\i netpub\wwwroot\ Picture\" & strFileNameOnly )
path = "http://localhost/Picture/" & strFileNameOnly
End If
But I dont know how to delete a image in the webserver,
if anybody Knows Pl reply to me...
Waiting for Ur Reply.......... ..............
Davidson
Comment