Deplyoed web files not getting sound using System.Media.SystemSounds.Beep.Play();

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karunakar2014
    New Member
    • Oct 2014
    • 1

    Deplyoed web files not getting sound using System.Media.SystemSounds.Beep.Play();

    Hi All,

    We are using below thing in Button click event. from project it is getting sound in web application. but After deploying the file sound is not coming on same system or any cliemnt system.

    Any one can you please help us.
    Code:
    using System.Media;
    System.Media.SystemSounds.Beep.Play();
    System.Media.SystemSounds.Asterisk.Play();
    System.Media.SystemSounds.Exclamation.Play();
    System.Media.SystemSounds.Question.Play();
    System.Media.SystemSounds.Hand.Play();
    Regards,
    venu
    Last edited by Frinavale; Oct 7 '14, 01:06 PM. Reason: Added code tags.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    You have posted C# code.

    C# code is compiled and executed on the web server, not on in the client (the web browser).

    This means that it will work on your development machine because your web server is the same computer that is running the browser; however, it will not work in a real world application.

    You need to look for a client side solution (using JavaScript or some sort of JavaScript framework like JQuery that plays a sound)

    -Frinny
    Last edited by Frinavale; Oct 7 '14, 01:32 PM.

    Comment

    • Bala Kumaran
      New Member
      • Jan 2013
      • 30

      #3
      Hello karunakar2014,

      I agree the reply of Frinavale. It is true. If you want to getting sound by clicking button, U may try jquery and Ajax

      Comment

      Working...