ASP Net Controls ASP.Net Tutorial

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" 
    Inherits="Default" %>





    UpdatePanel in action


    
         
               
            
                
                        
                            
                                

Pick up an important date


            
                                                                                    OnSelectionChanged="Calendar1_SelectionChanged" VisibleDate="5/1/2007" />
                                        
                                    
                                    
                                     
                            
                            
                                


                                    So [
                                    
                                    ] is important. Tell us why 
                                


                                                                        TextMode="MultiLine" Columns="50" Rows="10" />
                                
                                
                                
                            
                        
                

            
        

    


File: Default.aspx.cs
using System;
using System.Web.Services;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            TextBox1.Text = Calendar1.VisibleDate.ToShortDateString();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = "Picked up at " + DateTime.Now.ToShortTimeString();
        Label3.Text = TextBox1.Text;
    }
    protected void Calendar1_SelectionChanged(object sender, EventArgs e)
    {
        TextBox1.Text = Calendar1.SelectedDate.ToShortDateString();
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Label2.Text = "Saved at " + DateTime.Now.ToShortTimeString();
    }
}