Groups | Blog | Home
all groups > asp.net webcontrols > november 2003 >

asp.net webcontrols : Calendar broke?


Bob Blaker
11/21/2003 1:01:09 PM
Hi,

Has anyone sucessfully reset the background color for the "other" days,
i.e., OtherMonthDayStyle.BackColor? The default appears to be a wheat
color. I can set all the other properties for the "other" days, but not
color for some reason. Any ideas on how to make this work?

thanks,
Bob

Ken Cox [Microsoft MVP]
12/1/2003 9:01:19 PM
Hi Bob,

It seems to work in the samples below using ASP.NET 1.1. Do you have some
code you can show that is failing?

Ken

<asp:Calendar id="Calendar1" runat="server">
<OtherMonthDayStyle BackColor="#FFC0FF"></OtherMonthDayStyle>
</asp:Calendar>
<P>&nbsp;</P>
<P>
<asp:Button id="Button1" runat="server"
Text="Recolour"></asp:Button></P>

Private Sub Button1_Click _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
Calendar1.OtherMonthDayStyle.BackColor = _
Color.OrangeRed
End Sub


[quoted text, click to view]

AddThis Social Bookmark Button