Click here to Skip to main content
15,885,366 members
Articles / Web Development / ASP.NET

Date Picker User Control

Rate me:
Please Sign up or sign in to vote.
4.66/5 (43 votes)
2 Dec 2011CPOL6 min read 372.4K   18.2K   99  
A date picker user control in ASP.NET (C#, VS2010)
/*
 * DateTimePicker
 * 
 * Copyright (c) 2009..10 by Simon Baer.
 * Licensed unter the Code Project Open License (CPOL).
 */

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Example4 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
		Label1.Text = "Page loaded: " + DateTime.Now.ToString();
		Label2.Text = "Update panel loaded: " + DateTime.Now.ToString();
    }

	protected void cmdAsync_Click(object sender, EventArgs e)
	{
		Label3.Text = "Thank you for chosing " + Date1.CalendarDateString;
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Sevitec Informatik AG
Switzerland Switzerland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions