using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Web.UI.HtmlControls;

public partial class Ajax : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        HtmlButton hb = new HtmlButton();
        hb.ID = "hb";
        Panel1.Controls.Add(hb);
        hb.ServerClick += new EventHandler(hb_ServerClick);
        
            
/*
                        Button hb = new Button();
        hb.Text = reader["taskPaneItemName"].ToString();
        hb.Click += new EventHandler(hb_Click);
        this.FindControl("rpv_" + reader["taskPaneName"].ToString()).Controls.Add(hb);
*/         
       
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(hb,Label1);  
    }

    void hb_Click(object sender, EventArgs e)  
    {  
        Button hb = (Button)sender;  
        Label1.Text = hb.ClientID;  
    }  

    void hb_ServerClick(object sender, EventArgs e)  
    {  
        HtmlButton hb = (HtmlButton)sender;  
        Label1.Text = hb.ClientID + " " + DateTime.Now;  

    }  
}
