Click here to Skip to main content
15,902,784 members
Please Sign up or sign in to vote.
4.00/5 (3 votes)
See more:
Dear Friends,

I need to show the windows Messagebox in asp.net as it was my requirement. So i did the same but when i hosted it on one of the server just in order to get the work tested by testers, the same when checked shows a server level:500 error in the browser. I found that this problem is not related to any browser or network but related to web server level error (which is hosting the website).

Does the problem is related to showing of windows message box in asp.net or something else. Please help me out.

Thanks

Varun Sareen
Posted
Comments
Manas Bhardwaj 17-Feb-11 8:26am    
without looking at code it is difficult to suggest.

You need to show a message on the client (the code you have written is probably for the server).
See here[^].
 
Share this answer
 
Comments
fjdiewornncalwe 17-Feb-11 8:28am    
+5. Great Link
Abhinav S 17-Feb-11 8:32am    
Thanks - Marcus. Its gone into my bookmarks as well.
Varun Sareen 17-Feb-11 11:39am    
great link to my question abhinav.. :) thankssss
Abhinav S 17-Feb-11 11:43am    
You are welcome, Varun.
Manas Bhardwaj 17-Feb-11 11:03am    
agree with Marcus. +5
You can't show a message box in ASP.NET: it will try to show onteh server, not the client. This will annoy the webserver administrator...

Use the Alert instead:
Response.Write("<script>alert('Hello')</script>");
 
Share this answer
 
Comments
Varun Sareen 17-Feb-11 11:38am    
Thanks original Griff.. :)
 
Share this answer
 
v2
Comments
Sandeep Mewara 17-Feb-11 11:51am    
I see question closed, but thought of sharing the control and links that looked helpful.
Varun Sareen 19-Feb-11 23:55pm    
Thanks dear Sandeep. It's so nice of you :)
Sandeep Mewara 20-Feb-11 0:10am    
Glad it helped.
Sergey Alexandrovich Kryukov 9-Dec-11 1:18am    
My 5.
One more good alternative -- in my answer, please see.
--SA
One more alternative in my recent answer: Error in MessagBox printing[^].

—SA
 
Share this answer
 
One of the reasons a lot of newbies are confused is that, during development the client and server machines are the same. So their MessageBox.Show works fine and everybody's happy. Deployment day arrives and the message boxes are all gone. It's so common a mistake that maybe the compiler should issue a warning when people use it from web projects!

[Edit]
~~~~~~~~~

The 2 didn't hurt that bad until I saw it was a Platinum member. :omg:
 
Share this answer
 
v2
Comments
Abhinav S 17-Feb-11 11:01am    
You've been hit!
:)
But your point makes a lot of sense. My 5.
Nish Nishant 17-Feb-11 11:06am    
Thanks :-)
Manas Bhardwaj 17-Feb-11 11:01am    
have my 5. I hope it does some healing. ;P
Nish Nishant 17-Feb-11 11:06am    
Thanks Manas!
Varun Sareen 17-Feb-11 11:38am    
Thanks nishant :) thumbs up to your answer

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