調用代碼如下:
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