using System;
using System.Data;
using System.Configuration;
using System.Collections;
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;
using Telerik.Web.UI;

public partial class WebUserControl : System.Web.UI.UserControl
{
    //protected void Page_Load(object sender, EventArgs e)
    //{
    //     DateTime linkDate = new DateTime(2008,7,4);
    //    LinkButton link = new LinkButton();
    //    link.ID = linkDate.ToString("MM/dd/yyyy");
    //    link.Text = "Hello";
    //    link.Width = 50;
        
    //    //cancel event bubbling so that we don't post back from the parent cell control
    //    link.OnClientClick = "event.cancelBubble = true; if (event.stopPropagation)event.stopPropagation();";
    //    link.Click += new EventHandler(this.LinkClicked);
        
    //    CalendarCellContentTemplate template = new CalendarCellContentTemplate(RadCalendar1, linkDate, link);
        
    
    
    //}

    //public void LinkClicked(object sender, EventArgs e)
    //{
    //    Response.Write("clicked" + ((Control) sender).ClientID);
    //}

    //public class CalendarCellContentTemplate : ITemplate
    //{
    //    private Control cellContent = new Control();
    //    public CalendarCellContentTemplate(RadCalendar calendarInstance, DateTime cellDate, Control cellContent)
    //    {
    //        RadCalendarDay spec;
    //        this.cellContent = cellContent;
    //        int index = calendarInstance.SpecialDays.IndexOf(cellDate);
    //        spec = calendarInstance.SpecialDays[index];

    //        if (spec == null)
    //        {
    //            spec = new RadCalendarDay();
    //            spec.Date = cellDate;
    //            spec.TemplateID = spec.Date.ToString("MM/dd/yyyy");
    //            calendarInstance.SpecialDays.Add(spec);
    //        }

    //        DayTemplate template = new DayTemplate();
    //        template.ID = spec.TemplateID;
    //        template.Content = this;

    //        spec.Repeatable = Telerik.Web.UI.Calendar.RecurringEvents.DayInMonth;
    //        calendarInstance.CalendarDayTemplates.Add(template);
    //    }

    //    public void InstantiateIn(Control container)
    //    {
    //        container.Controls.Add(this.cellContent);
    //    }
    //}

    protected void TypeComboBox_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        Label1.Text = DateTime.Now.ToString();
        TextBox2.Text = DateTime.Now.ToString();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label3.Text = "This is a regular postback";
    }
}
