Right click the solution explorer and click the add references and choose
System.Windows.Forms
Now in your aspx.cs page
System.Windows.Forms.MessageBox.Show("Type any text");
Now run and check you will be getting the messagebox in ASP.Net.
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.
abdul muqeetPosted May 19, 2012, 4:44 AM
how can i show message from sql server , like when i enter data it should show " Your ID is 123 " from sql server
Mohd AdilPosted May 22, 2011, 8:10 AM
Yes, it works. It has done my work very easily. I am very happy.
Jonathas SucupiraPosted Apr 21, 2011, 1:24 PM
I believe this would work ClientScript.RegisterStartupScript(Me.GetType(), "Alert", "javascript:alert('I am an alert box!');", True)
Krishna GaradPosted Apr 21, 2011, 8:41 AM
Suthish is right it will not work on server.
sumitha vrPosted Apr 21, 2011, 5:56 AM
Yes This Is great way to use Message box in Asp.net. Thanks a lot...
Suthish NairPosted Feb 2, 2011, 11:32 AM
This will work only on local system, not on server.
Hasibul HaquePosted Jan 31, 2011, 4:35 AM
It works but not as a Dialog.... I have to find message from task bar.