AJAX Message Box Control Free Download - Asp.Net User Controls - Error, Alert, Info Messageboxes

ASP.NET Popup Message Box User Control

Update 31DEC08: Posted jQuery Alert Dialogs which creates these same dialogs using jQuery.

Alerting my users to some action that is about to occur or has occurred has always been a pain for me in web programming. Everyone has probably used Page.ClientScript.RegisterStartupScript to popup generic message boxes. Tonight I was looking for a better way to accomplish this task and came across Janko's post Create MessageBox user control using ASP.NET and CSS . He presents a great user control to display four types of messages. I decided to take things a little further by using the ModalPopup control from the AjaxControlToolkit as well as some additional CSS and images from Matt Berseth's post YUI Style Yes/No Confirm Dialog with the ModalPopupExtender. I also added the ability to set the height and width of the message container. Though far from perfect, I think its a good start for an evening's work. Please check it out and let me know if you have ideas to improve the control.

Demo | Download

Screenshot of End Product

errormessage

infomessage

successmessage

warningmessage

My to do list:

1. Add the ability to dynamically set the header text.
2. Overload for default height and width or maybe figure out how big the box should be based upon the message string length.

0 comments:

Post a Comment

My Blog List