<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="Default" %>
UpdatePanel in action
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();
}
}