仿新浪的的彈出對話框控件

id="alimamaf0.2761358069950211" style="WIDTH: 468px; HEIGHT: 60px" border="0" name="alimamaf0.2761358069950211" marginwidth="0" marginheight="0" src="http://p.mm.cn.yahoo.com/alimama.php?i=mm_10047322_140881_140928&u=http%3A%2F%2Fwww.chenjiliang.com%2FArticle%2FView.aspx%3FArticleID%3D7285%26TypeID%3D89&w=468&h=60&re=1280x768&sz=12&r=http%3A%2F%2Fwww.chenjiliang.com%2FArticle%2FDefault.aspx%3FTypeID%3D89&cg=6b04a203378250c32a0a398bbf9cce56&prp=82864884&cas=prp&cah=738&caw=1280&ccd=32&ctz=8&cbh=150&cbw=1264&cja=1&cf=9.0&iss=0&t=2&tc=0033CC&dc=000000&bgc=F0F0F0&bdc=F0F0F0&lc=008000&bmc=F0F0F0&as=0&bgp=0&ic=1&tt=%E4%BB%BF%E6%96%B0%E6%B5%AA%E7%9A%84%E7%9A%84%E5%BC%B9%E5%87%BA%E5%AF%B9%E8%AF%9D%E6%A1%86%E6%8E%A7%E4%BB%B6%20%40%E9%98%BF%E8%89%AF.NET&sx=450&sy=120&ac=420&pf=1" frameborder="0" scrolling="no">
效果如下:
單擊顯示全圖,Ctrl+滾輪縮放圖片
單擊顯示全圖,Ctrl+滾輪縮放圖片


調用代碼如下:
複製  保存
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        AlertMsg1.TreeAlertShowType = TreeControls.AlertMsg.TreeAlertType.Confirm;
        AlertMsg1.Title = "顯示對話框內容測試";     /////標題   
        AlertMsg1.ShowTreeAlertMsg("顯示對話框內容測試-- E收.net!");        /////////////////顯示對話框       

    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        AlertMsg1.Title = "E收.net";
        AlertMsg1.TreeAlertShowType = TreeControls.AlertMsg.TreeAlertType.Alert;
        AlertMsg1.ShowTreeAlertMsg("E收.net,我的博客lsmsky.cnblogs.com");
    }
    protected void AlertMsg1_OnSelect(object sender, EventArgs e)
    {
        if (AlertMsg1.TreeAlertSelectEventType == TreeControls.AlertMsg.SelectEventType.Confirm)
        {
            lbMsg.Text = "你選擇了確認";
        }
        else
        {
            lbMsg.Text = "你選擇了取消";
        }
    }
}

控件源碼下載:TreeControls.rar
http://files.cnblogs.com/lsmsky/treecontrols.rar  
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章