views:

167

answers:

0

hi guys, I have a repeater which contain thumbviewer.I used following code to bind repeater

Dim files As IList(Of FileInfo) = New List(Of FileInfo)()
        Dim dtDoc As DataTable = objdoc.GetDocDetails(Session("RegID"))


                Dim filters As String = "*.jpg;*.png;*.gif"
                For Each filter As String In filters.Split(";"c)
                    Dim fit As FileInfo() = New DirectoryInfo(Me.Server.MapPath("../SiteImages/" & userName & "/" & Session("RegID") & "/")).GetFiles(filter)

                    For Each fi As FileInfo In fit
                        files.Add(fi)
                    Next
                Next
  Me.Repeater1.DataSource = files
                Me.Repeater1.DataBind()
            End If

I have names of images in database,means in dtDoc,each row contains a field for image.I want to display images that are only in database but not images that are not in database.So how can i modify the code to meet my requirement.