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:DropDownLi st ID="drpMonthCal " runat="server"
AutoPostBack="T rue"
OnSelectedIndex Changed="drpCal Month_SelectedI ndexChanged"
Width="101px" />
</td>
<td align="left">
<asp:DropDownLi st ID="drpYearCal " runat="server"
AutoPostBack="T rue"
OnSelectedIndex Changed="drpCal Year_SelectedIn dexChanged"
Width="104px" />
</td>
</tr>
<tr valign="top">
<td colspan="2" align="center">
<asp:Calendar ID="calSource" runat="server"
BackColor="#FFF FCC"
BorderColor="#F FCC66" BorderWidth="1p x"
DayNameFormat=" Shortest"
Font-Names="Verdana" Font-Size="8pt"
ForeColor="#663 399" Height="200px"
ShowGridLines=" True" Width="220px"
OnSelectionChan ged="calSource_ SelectionChange d">
<SelectedDaySty le BackColor="#FFC C66" />
<TodayDayStyl e ForeColor="#CC9 966" />
<SelectorStyl e BackColor="#FFC C66" />
<OtherMonthDayS tyle ForeColor="#CC9 966" />
<NextPrevStyl e Font-Size="9pt" ForeColor="#FFF FCC"
/>
<DayHeaderSty le BackColor="#FFC C66"
Font-Bold="True" Height="1px" />
<TitleStyle BackColor="#990 000" Font-Bold="True"
Font-Size="9pt" ForeColor="#FFF FCC" />
</asp:Calendar>
</td>
</tr>
</table>
[b:c30d324379].cs file[/b:c30d324379]
<%@ Page Language="C#" MasterPageFile= "~/Pop/PopMasterPage.m aster"
AutoEventWireup ="true" CodeFile="Calen dar.aspx.cs"
Inherits="Pop_C alendar" Title="Mission Beach Volleyball - Calendar"
%>
<asp:Content ID="Content1"
ContentPlaceHol derID="PopConte ntPlaceHolder" 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:DropDownLi st ID="drpMonthCal " runat="server"
AutoPostBack="T rue"
OnSelectedIndex Changed="drpCal Month_SelectedI ndexChanged"
Width="101px" />
</td>
<td align="left">
<asp:DropDownLi st ID="drpYearCal " runat="server"
AutoPostBack="T rue"
OnSelectedIndex Changed="drpCal Year_SelectedIn dexChanged"
Width="104px" />
</td>
</tr>
<tr valign="top">
<td colspan="2" align="center">
<asp:Calendar ID="calSource" runat="server"
BackColor="#FFF FCC"
BorderColor="#F FCC66" BorderWidth="1p x"
DayNameFormat=" Shortest"
Font-Names="Verdana" Font-Size="8pt"
ForeColor="#663 399" Height="200px"
ShowGridLines=" True" Width="220px"
OnSelectionChan ged="calSource_ SelectionChange d">
<SelectedDaySty le BackColor="#FFC C66" />
<TodayDayStyl e ForeColor="#CC9 966" />
<SelectorStyl e BackColor="#FFC C66" />
<OtherMonthDayS tyle ForeColor="#CC9 966" />
<NextPrevStyl e Font-Size="9pt" ForeColor="#FFF FCC"
/>
<DayHeaderSty le BackColor="#FFC C66"
Font-Bold="True" Height="1px" />
<TitleStyle BackColor="#990 000" Font-Bold="True"
Font-Size="9pt" ForeColor="#FFF FCC" />
</asp:Calendar>
</td>
</tr>
</table>
</asp:Content>
I hope it helps.
----------------------------------
http://community.ihostasp.net
ASP.NET Developer Community