Friday, December 02, 2011

ASP : The Web Form equivalent of MessageBox

When you are writing a Windows application, the ubiquitous MessageBox is extremely useful for popping up a quick debug message but it’s not available for ASP.NET Web Forms.

In such cases, use:

Response.Write("<script language='javascript'>alert('Your message');</script>");


Enjoy!

No comments: