Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to play .mp3 file by clicking the name of .mp3 file in gridview?
Posted
Updated 6-Apr-12 2:53am
v2

1 solution

Hello

1. Create a Class (SoundFile) that has 2 properties FileName, FilePath

2.Create a List
C#
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)
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900