热点推荐:ASP.Net | ADO.Net | VB.Net | Web服务器 | Access | MSSQL | MySQL | Oracle | .Net控件 | Win 9x | Win 2000 | Win 2003 | DOS | Unix | 注册表 | 应用其它 | 安装调试 | 基本操作 | 使用技巧 | 系统优化 |故障处理 | 个性风格 | 病毒安全 | 专杀工具
您现在的位置: 中华IT技术网 >> .Net >> ASP.NET >> 正文
全文
MessageBox Control in ASP.NET
作者:1024k    文章来源:本站原创    点击数:    更新时间:2007-9-7

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)

相关文章
最新更新
编辑推荐
热门图片
频道大全
文章阅读排行
周排行
月排行