自己其实也可以随时pop几个对话框给用户,window.alert(‘Here you are !’)
但是,弹出来就不大好看,虽然很标准。
网络是个淘金场,一不小心就能发现一个惊喜,这不,找到了一个“EeekSoft.Web.PopupWin.dll”,一个免费的,漂亮的对话框弹出器。
他的特点是:
1 :动画方式弹出,就像MSN的提示框
2 :漂亮
3 :还可以再在开一个更加详细的内容网页
4 :自动关闭,无需手工确认那个ok
5 :用起来简单
简单的使用方法:
public void ShowMessage( string msg)
... {
//Response.Write("<script>alert('"+msg+"');</script>");
EeekSoft.Web.PopupWin pop = new EeekSoft.Web.PopupWin();
this.Controls.Add(pop);
pop.Text = msg;
pop.Message = msg;
pop.Title = "XXX-System";
pop.WindowScroll = true;
pop.HideAfter = 5000;
pop.DockMode = EeekSoft.Web.PopupDocking.BottomLeft;
pop.OffsetX = 300;
pop.OffsetY = 400;
}
更多资料:
http: // www.codeproject.com/aspnet/asppopup.asp
意义:实用
但是,弹出来就不大好看,虽然很标准。
网络是个淘金场,一不小心就能发现一个惊喜,这不,找到了一个“EeekSoft.Web.PopupWin.dll”,一个免费的,漂亮的对话框弹出器。
他的特点是:
1 :动画方式弹出,就像MSN的提示框
2 :漂亮
3 :还可以再在开一个更加详细的内容网页
4 :自动关闭,无需手工确认那个ok
5 :用起来简单
简单的使用方法:
public void ShowMessage( string msg)
... {
//Response.Write("<script>alert('"+msg+"');</script>");
EeekSoft.Web.PopupWin pop = new EeekSoft.Web.PopupWin();
this.Controls.Add(pop);
pop.Text = msg;
pop.Message = msg;
pop.Title = "XXX-System";
pop.WindowScroll = true;
pop.HideAfter = 5000;
pop.DockMode = EeekSoft.Web.PopupDocking.BottomLeft;
pop.OffsetX = 300;
pop.OffsetY = 400;
}
更多资料:
http: // www.codeproject.com/aspnet/asppopup.asp
意义:实用
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;