































































ClientScriptManager是ASP.NET 2.0特性,是ASP.NET对于客户端脚本的支持,您可以查一下MSDN。
一定要杜绝使用Response.Write,生成不标准的HTML,而且破坏了ASP.NET模型。
这里写一个模型.
<!-- Popup.aspx -->
<%@ Register TagPrefix="cc1" Namespace="EeekSoft.Web"
Assembly="EeekSoft.Web.PopupWin" %>
<cc1:popupwin id="popupWin" runat="server" visible="False"
colorstyle="Blue" width="230px" height="100px" dockmode="BottomLeft"
windowscroll="False" windowsize="300, 200"></cc1:popupwin>
// Popup.aspx.cs
// Change action type
popupWin.ActionType=EeekSoft.Web.PopupAction.MessageWindow;
// Set popup and window texts
popupWin.Title="This is popup";
popupWin.Message="<i>Message</i> displayed in popup";
popupWin.Text="Text to show in new window..";
// Change color style
popupWin.ColorStyle=EeekSoft.Web.PopupColorStyle.Green;
// Change timing
popupWin.HideAfter=5000;
popupWin.ShowAfter=500;
// Show popup (after page is loaded)
popupWin.Visible=true;