Hello
1. Create a Class (
SoundFile
) that has 2 properties
FileName
,
FilePath
2.Create a List
List<SoundFile> FileList = new List<SoundFile>();
3. Initialize
FileList
4. Bind the List to the
GridView
5. In
SelectedInexChanged
Get the
SelectedItem
and it's name and path, then you can play it.
I suggest to read this article:
A low-level audio player in C#
And Look at the links:
Play MP3 Files Using C#
playing mp3 through c# (Pay attention to SAKryukov's answer)