漂亮的弹出对话框

 

自己其实也可以随时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

意义:实用

 

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;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值