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

Customizing the ASP.NET Calendar Control

Rate me:
Please Sign up or sign in to vote.
4.60/5 (15 votes)
21 Jul 2011CPOL2 min read 264.9K   11.2K   32  
Adding dropdownlists for month and year to the ASP.NET Calendar control for easier navigation.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PopupCalendar.aspx.cs" Inherits="ContontrolsExersise.PopupCalendar" %>

<%--<%@ Register src="CalenderUserControl.ascx" tagname="CalenderUserControl" tagprefix="uc1" %>--%>

<%@ Register src="CalControl1.ascx" tagname="CalControl1" tagprefix="uc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" language="javascript">
        function SetDate(dateValue) {
            ctl = window.location.search.substr(1).substring(4);
            thisForm = window.opener.document.forms[0].elements[ctl].value = dateValue;
             self.close();
            }

    </script>
</head>



<body style="margin:0px;">
<form id="form1" runat="server">
<uc2:CalControl1 ID="CalControl11" runat="server" />
</form>
</body>

</html>

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
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions