Click Here to Install Silverlight*
IndiaChange|All Microsoft Sites
MSDN
|Developer Centers|Library|Downloads|How To Buy|Subscribers|My MSDN
 
MessageBox Control in ASP.NET
By Saravana Kumar
 
Tool Posted: September 9, 2003
 

Download
(After downloading, change the extension of the file to .zip)

 
Introduction
 
This tool consists of controls which is used to show alert message box or confirmation message in ASP.NET. In ASP.NET, if you want to show message box, then you need to go for client side scripts only. But with this control, you no need to write any client side scripts. You only need to set few properties for this control. Then this control will take care of injecting client side scripts for you. This tool has two controls
 
1. ShowMessageAtStartup
2. MessageAtSubmit
 
 
ShowMessageAtStartup
 
This control is used to show message at startup of the page. For example, if you want to inform the user with some information using message box after the post back. Then you can use this control. This control has following two properties,
 
MessageText: This property is used to set the Message which is showed in the message box.
Enabled: This property is used for enabling or disabling this control depending upon the
requirement.
 
MessageAtSubmit
 
This control is used to show alert message or confirm message box when the page is submitted. For example, when the user is pressing a button to delete a record. During that time, if you want to ask the user for confirmation. Then you can use this control. This control has following properties,
 
MessageText: This property is used to set the Message which is showed in the message box.
Enabled: This property is used for enabling or disabling this control depending upon the
requirement.
IsConfirmMessage: This property is used to mention whether it is confirmation message box or alert message box.
ConfirmMessagePassClientScript: This property is used to mention the client side script which has to executed if the confirmation message return true. i.e. when users presses ok button. This property will be used only when isConfirmmessage property is set to true
ConfirmMessageFailClientScript: This property is used to mention the client side script which
has to executed if the confirmation message return false. i.e. when users presses
cancel button. This property will be used only when isConfirmmessage property
is set to true.
 
Installation Procedure
 
Extract the Zip file attached with this article to your local folder. Then include this control in VS.NET ToolBox. In the Designer, right-click on the Toolbox and choose Add/Remove Items . Again, select the PopupMessage.dll file. This will add two new items to the Toolbox as show in the above figure. You can then drag and drop the control from the Toolbox onto the Designer. After drag and drop, you can use property window to set the properties for this control.
 

Download
(After downloading, change the extension of the file to .zip)

 
Saravana Kumar
Microsoft Community Star
www.extremeexperts.com
 
 

©2009 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy Statement
Microsoft