I started with the example url from the first reply, and it did some
things great, but the calendar included days from the previous and
next months and the drop down lists did not seem to update correctly
when those days were selected. I am a newbie to .Net, but here is
what I came up with:
aspx file
<table cellpadding="2" cellspacing="0" border="0"
align="center">
<tr valign="top">
<td colspan="2" align="left">
<asp:Label ID="lblDate" runat="server" Text="" />
</td>
</tr>
<tr valign="top">
<td align="left">
<asp:DropDownList ID="drpMonthCal" runat="server"
AutoPostBack="True"
OnSelectedIndexChanged="drpCalMonth_SelectedIndexC hanged"
Width="101px" />
</td>
<td align="left">
<asp:DropDownList ID="drpYearCal" runat="server"
AutoPostBack="True"
OnSelectedIndexChanged="drpCalYear_SelectedIndexCh anged"
Width="104px" />
</td>
</tr>
<tr valign="top">
<td colspan="2" align="center">
<asp:Calendar ID="calSource" runat="server"
BackColor="#FFFFCC"
BorderColor="#FFCC66" BorderWidth="1px"
DayNameFormat="Shortest"
Font-Names="Verdana" Font-Size="8pt"
ForeColor="#663399" Height="200px"
ShowGridLines="True" Width="220px"
OnSelectionChanged="calSource_SelectionChanged">
<SelectedDayStyle BackColor="#FFCC66" />
<TodayDayStyle ForeColor="#CC9966" />
<SelectorStyle BackColor="#FFCC66" />
<OtherMonthDayStyle ForeColor="#CC9966" />
<NextPrevStyle Font-Size="9pt" ForeColor="#FFFFCC"
/>
<DayHeaderStyle BackColor="#FFCC66"
Font-Bold="True" Height="1px" />
<TitleStyle BackColor="#990000" Font-Bold="True"
Font-Size="9pt" ForeColor="#FFFFCC" />
</asp:Calendar>
</td>
</tr>
</table>
[b:c30d324379].cs file[/b:c30d324379]
<%@ Page Language="C#" MasterPageFile="~/Pop/PopMasterPage.master"
AutoEventWireup="true" CodeFile="Calendar.aspx.cs"
Inherits="Pop_Calendar" Title="Mission Beach Volleyball - Calendar"
%>
<asp:Content ID="Content1"
ContentPlaceHolderID="PopContentPlaceHolder" Runat="Server">
<table cellpadding="2" cellspacing="0" border="0"
align="center">
<tr valign="top">
<td colspan="2" align="left">
<asp:Label ID="lblDate" runat="server" Text="" />
</td>
</tr>
<tr valign="top">
<td align="left">
<asp:DropDownList ID="drpMonthCal" runat="server"
AutoPostBack="True"
OnSelectedIndexChanged="drpCalMonth_SelectedIndexC hanged"
Width="101px" />
</td>
<td align="left">
<asp:DropDownList ID="drpYearCal" runat="server"
AutoPostBack="True"
OnSelectedIndexChanged="drpCalYear_SelectedIndexCh anged"
Width="104px" />
</td>
</tr>
<tr valign="top">
<td colspan="2" align="center">
<asp:Calendar ID="calSource" runat="server"
BackColor="#FFFFCC"
BorderColor="#FFCC66" BorderWidth="1px"
DayNameFormat="Shortest"
Font-Names="Verdana" Font-Size="8pt"
ForeColor="#663399" Height="200px"
ShowGridLines="True" Width="220px"
OnSelectionChanged="calSource_SelectionChanged">
<SelectedDayStyle BackColor="#FFCC66" />
<TodayDayStyle ForeColor="#CC9966" />
<SelectorStyle BackColor="#FFCC66" />
<OtherMonthDayStyle ForeColor="#CC9966" />
<NextPrevStyle Font-Size="9pt" ForeColor="#FFFFCC"
/>
<DayHeaderStyle BackColor="#FFCC66"
Font-Bold="True" Height="1px" />
<TitleStyle BackColor="#990000" Font-Bold="True"
Font-Size="9pt" ForeColor="#FFFFCC" />
</asp:Calendar>
</td>
</tr>
</table>
</asp:Content>
I hope it helps.
----------------------------------
http://community.ihostasp.net
ASP.NET Developer Community