Click here to Skip to main content
16,004,647 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ASP.Net GridView Displaying DateTime value in the format 'dd-MM-yy' Pin
bokuceres4-Feb-08 17:36
bokuceres4-Feb-08 17:36 
GeneralRe: ASP.Net GridView Displaying DateTime value in the format 'dd-MM-yy' Pin
A.Redha4-Feb-08 23:20
A.Redha4-Feb-08 23:20 
GeneralRe: ASP.Net GridView Displaying DateTime value in the format 'dd-MM-yy' Pin
bokuceres5-Feb-08 17:14
bokuceres5-Feb-08 17:14 
GeneralExporting multiple GridView to multiple sheets in single excel file Pin
pradeep kumarappagari4-Feb-08 2:58
pradeep kumarappagari4-Feb-08 2:58 
GeneralRe: Exporting multiple GridView to multiple sheets in single excel file Pin
pmarfleet4-Feb-08 4:09
pmarfleet4-Feb-08 4:09 
GeneralRegular Expresion with Javascript Pin
danasegaranea4-Feb-08 2:51
danasegaranea4-Feb-08 2:51 
GeneralRe: Regular Expresion with Javascript Pin
pmarfleet4-Feb-08 4:07
pmarfleet4-Feb-08 4:07 
Questionproblem with sound functionality in ASP.NET and C# Pin
S.Dhanasekaran4-Feb-08 2:33
S.Dhanasekaran4-Feb-08 2:33 
I have a problem which i am facing in my chat application. I am working on asp.net 2.0 and C#. My problem is regarding a sound functionality. I have to provide a visitor with a functionality of ringing a bell on the visitor chat window page. So when the visitor rings the bell, it is supposed to ring on the operator's machine. Now i have the below mentioned code... This works fine on a local environment, but when i uploaded this to my server, it doesn't work...

the logic is as follows... i have 2 pages - the visitor chat window & the operator chat window...

When the visitor presses the bell icon on the visitor chat window page, i write his ID & Is Belled flag onto to an XML file.

Now on the operator side i check continuously for correct operator receiving the ringing. Then i am calling the sound function on my server. No plug ins are used...



string soundPath = "";
soundPath = "http://"+Request.ServerVariables["HTTP_HOST"]+"/images/LiveChatImages/ringout.wav";



System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();

myPlayer.SoundLocation = soundPath;
myPlayer.Play();

i am using the soundplayer class in asp.net 2.0


another code i also tried with no success is below:




public void PlaySound()
{
string soundPath = "";
soundPath = http://"+Request.ServerVariables["HTTP_HOST"]+"/images/LiveChatImages/ringout.wav";

WSounds ws = new WSounds();

ws.Play(soundPath, ws.SND_FILENAME | ws.SND_ASYNC);


}


public class WSounds
{
[DllImport("WinMM.dll")]
public static extern bool PlaySound(string fname, int Mod, int flag);

// these are the SoundFlags we are using here, check mmsystem.h for more

public int SND_ASYNC = 0x0001; // play asynchronously

public int SND_FILENAME = 0x00020000; // use file name

public int SND_PURGE = 0x0040; // purge non-static events

public void Play(string fname, int SoundFlags)
{

PlaySound(fname, 0, SoundFlags);

}

}


Anybody can help me with my problem... both these codes are working in my local system ... but none work on the server. Can anybody point out where i am wrong?

Thanks & regards,
S.Dhanasekaran
dhansmani@gmail.com Smile | :)
GeneralRe: problem with sound functionality in ASP.NET and C# Pin
Christian Graus4-Feb-08 17:25
protectorChristian Graus4-Feb-08 17:25 
GeneralRe: problem with sound functionality in ASP.NET and C# Pin
Steve Echols4-Feb-08 18:41
Steve Echols4-Feb-08 18:41 
GeneralRe: problem with sound functionality in ASP.NET and C# Pin
Steve Echols4-Feb-08 18:41
Steve Echols4-Feb-08 18:41 
GeneralASP.Net/C# - Trap the button click event from html content Pin
SB 4-Feb-08 2:17
SB 4-Feb-08 2:17 
GeneralRe: ASP.Net/C# - Trap the button click event from html content Pin
Paddy Boyd4-Feb-08 2:27
Paddy Boyd4-Feb-08 2:27 
QuestionHow do I get a control into my ToolBox Pin
Brady Kelly4-Feb-08 2:10
Brady Kelly4-Feb-08 2:10 
Generaldropdown Pin
ptvce4-Feb-08 1:35
ptvce4-Feb-08 1:35 
GeneralRe: dropdown Pin
pmarfleet4-Feb-08 4:04
pmarfleet4-Feb-08 4:04 
GeneralOnCheckedChanged not firing Pin
mastoj4-Feb-08 1:11
mastoj4-Feb-08 1:11 
GeneralRe: OnCheckedChanged not firing Pin
mastoj4-Feb-08 1:46
mastoj4-Feb-08 1:46 
GeneralRe: OnCheckedChanged not firing Pin
Superfo7816-Sep-10 6:46
Superfo7816-Sep-10 6:46 
GeneralGlobal Asax Session_End Pin
taltal814-Feb-08 1:09
taltal814-Feb-08 1:09 
AnswerRe: Global Asax Session_End Pin
Guffa4-Feb-08 2:48
Guffa4-Feb-08 2:48 
GeneralRedierct to another page when we press on Enter Key instead of Submit button Pin
honeyss4-Feb-08 0:18
honeyss4-Feb-08 0:18 
GeneralRe: Redierct to another page when we press on Enter Key instead of Submit button Pin
jagan1234-Feb-08 0:30
jagan1234-Feb-08 0:30 
GeneralRetrive the HTML Table values Pin
danasegaranea4-Feb-08 0:11
danasegaranea4-Feb-08 0:11 
GeneralRe: Retrive the HTML Table values Pin
Guffa4-Feb-08 2:50
Guffa4-Feb-08 2:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.