I have created a search function within a media player that uses a list-box to output the data and when a user clicks a song I want that song to play. However, when I select a song for some reason I get two black slashes instead of one. Please help. I've tried replacing them already.
string path = @"C:UsersUsernameMusic";
path = path.Replace(@"", @"");
string selectedsong, filetoplay;
selectedsong = listBox1.SelectedItem.ToString();
filetoplay = path + selectedsong + ".mp3";
Form1.wplayer.URL = filetoplay;
What I'm currently getting at the moment is C:\Users\Username\Music\Song.mp3 and as a result the song won't play
See Question&Answers more detail:os