I am uploading image.While uploading images i am saving image name and the link for that iage in one textfile. like this, abc.jpeg,http://google.com
Now i want to display all that images with corresponding links using classic asp.
How should I do this?
Please help.
I used this asp code:
<%
For Each FileName in fold.Files
Dim Fname
Dim strFileName
Dim objFSO
Dim objTextFile
Dim URLString
Dim strReadLineText
Fname= mid(FileName.Path,instrrev(FileName.Path,"\\")+1)
strFileName = "../admin/Links.txt"
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(Server.MapPath(strFileName))
URLString=""
Do While Not objTextFile.AtEndOfStream
strReadLineText = objTextFile.ReadLine
'response.Write(strReadLineText & "<br>")
If strReadLineText<>"" then
If Instr(strReadLineText,",")>0 then
strReadLineTextArr=split(strReadLineText,",")
response.Write(strReadLineTextArr(0))
URLString=strReadLineTextArr(1)
end if
end if
Loop
' Close and release file references
objTextFile.Close
Set objTextFile = Nothing
Set objFSO = Nothing
its displaying all images but for all images link is same.its reading directly the last link from textfile....What is the problem with my code?