To me the problem still occurs. This is the code I am using...
Code:
Dim NewStr As String = ""
Dim Directory As New DirectoryInfo(Request.QueryString("f"))
Dim File As FileInfo
For Each File In Directory.GetFiles("*.jpg")
NewStr += File.Name.Substring(0, File.Name.Length - 4) & ","
Next
Dim myArray() As String = Split(NewStr.Substring(0, NewStr.Length - 1), ",")
' This is where the error occurs... it ALWAYS returns IndexOf = 0
Dim CurrentIndex As Integer = Array.IndexOf(myArray, Request.QueryString("i")) + 1
lblcuridx.Text = "index of " & Request.QueryString("i") & ".jpg is " & CurrentIndex
What am I doing wrong?