hi, indeed this was a very good solution. now i making this thing generic. so that i only have to call the msgpopup class and display the message. i am calling the dll of the project where i am writing the same code ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), "alert('hi');", true); but this seems to be not working. it fails to display the message box. following is the code in the dll. the code:-- ========== using System; using System.Data; using System.Configuration; using System.Web; using System.Collections; using System.Text; using System.Web.UI; /// <summary> /// Summary description for MsgPopUp /// </summary> public class MsgPopUp { protected static Hashtable handlerPages = new Hashtable(); public static void Show(string Message) { try { if (!(handlerPages.Contains(HttpContext.Current.Handler))) { Page currentPage = (Page)HttpContext.Current.Handler; if (!((currentPage == null))) { Queue messageQueue = new Queue(); messageQueue.Enqueue(Message); handlerPages.Add(HttpContext.Current.Handler, messageQueue);