Tuesday 10 February, 2009

ASP.NET Popup Message Box User Control

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 usedPage.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.

Screenshot:







ASP.NET Popup Message Box User Control
by Bill Beckelman


Thanks to Bill Beckelman







No comments:

Post a Comment