|
August 22, 2002 Using the MessageBox Class Tips: August 2002
Yehuda Shiran, Ph.D.
|
|
You're probably well acquainted with the alert() method you use so often in client-side JavaScript code. The alert() method is great for debugging scripts the good old-fashioned way--tracing variables by displaying their values along the flow. JScript .NET provides similar capabilities via the System.Window.Forms.MessageBox.Show() method. You pass this method a single argument, a string, and it pops up a window displaying this string and an OK button.The message box is called modal. A window or a form is modal if it retains the focus until you explicitly close it. It's a common practice to make dialog boxes and messages modal, since you want to make sure the user reads the message before he or she continues working with the application.
The To learn more about JScript .NET and ASP.NET, go to Column 116, JScript .NET, Part IX: Displaying Information.
People who read this tip also read these tips: Look for similar tips by subject: |