Anyone know how to get this VB (ASP.NET) app to load correctly?

big1

New member
This is the output: http://i39.tinypic.com/eamb1k.png

For some reason the image and list of text files won't load when I type in the actor's name and press "guess". How do I get it to work with this code?:

Imports System.IO
Public Class Actors
Inherits System.Web.UI.Page

Dim strCurrent As String
Dim strPath As String
Dim strGuess As String
Dim strDirectories() As String
Dim strSelection As String
Dim strFiles() As String
Dim strActorName As String
Dim intPos As Integer



Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


If Page.IsPostBack = False Then

intPos = 0



End If

lstFiles.Visible = False

strPath = AppDomain.CurrentDomain.BaseDirectory()
strPath = strPath & "App Data"
strDirectories = Directory.GetDirectories(strPath)

strPath = strDirectories(intPos)

strFiles = Directory.GetFiles(strPath)

lstFiles.Text = AppDomain.CurrentDomain.BaseDirectory() & "App Data"


End Sub

Protected Sub ImageButton1_Click(sender As Object, ByVal e As System.EventArgs) Handles imgActor.Click

intPos += 1
strPath = strDirectories(intPos)
strFiles = Directory.GetFiles(strPath)

End Sub

Protected Sub btnGuess_Click(sender As Object, ByVal e As System.EventArgs) Handles btnGuess.Click
strGuess = txtGuess.Text

strGuess = strGuess.ToLower()
strGuess = strGuess.Replace(" "c, "_"c)
txtGuess.Text = strGuess

If strPath.EndsWith(strGuess) & strGuess <> "" Then
lstFiles.Visible = True



End If
End Sub

Protected Sub lstMovies_SelectedIndexChange(sender As Object, ByVal e As System.EventArgs) Handles
lstFiles.SelectedIndexChanged


End Sub

End Class
 
Back
Top