attempting to create an objectDataSource for files

G

Guest

I'm attempting to create an objectdatasource of the most simple kind to just
return a list of file names tobe bound to a grid view

basicly i want to just list the file names from a directory with mp3 as the
extention.
the class i have created is as follows: and it is very incomplete

Imports Microsoft.VisualBasic
Imports System.IO
Public Class RadioShowFunctions
Private _szFileName As String

#Region "Database fields as properties"
Public Property szFileName() As String
Get
Return _szFileName
End Get
Set(ByVal value As String)
_szFileName = value
End Set

End Property
#END Region

Public Function fn_getallRadioShows() As DirectoryInfo
Dim ri As System.IO.DirectoryInfo = New
System.IO.DirectoryInfo("c:\websites\arlnewlook\radioshows")
Return ri
End Function
Public Function fn_getRadioShowsDS() As Array
Dim ary As Array = Me.fn_getallRadioShows.GetFiles("*.mp3")
' System.Web.HttpContext.Current.Response.Write(ary.Length.ToString)
Return ary
End Function
End Class

how can i get fn_getRadioShowsDS to return a list of type ObjectDataSource.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top