I want to play a song by clicking a button. For example if i want to play song using windows media player here is the code....On click of play button
Process myProcess = new Process();
myProcess.StartInfo.Arguments = @"C:\bin\pleaseforgiveme.mp3";
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
This works fine. The problem i am having right now is if the file name is C:\bin\Please forgive me.mp3 i.e if it has whitespaces in the file (space b/w please forgive me) it does n't play the file. Or if it has underscore(_) in file name like please_forgive_me it does not play file. It throws exception. Could any of you help me in this ?
Thanks and with regards