B
Bruce W..1
I want to change the display style of certain days in my Calendar control. This is done
with the DayRender event.
So I put this in the codebehind:
private void Calendar1_DayRender (object sender,
System.Web.UI.WebControls.DayRenderEventArgs e)
{
// Display weekend dates in green boxes.
Style weekendStyle = new Style();
weekendStyle.BackColor = System.Drawing.Color.Green;
}
And I put this into InitializeComponent():
this.Calendar1.DayRender += new System.EventHandler(this.Calendar1_DayRender);
There's something I'm not doing right because I get a compile error:
....DayRenderEventArgs)' does not match delegate 'void System.EventHandler(object,
System.EventArgs)'
How does one work with the DayRender event?
Thanks for your help.
with the DayRender event.
So I put this in the codebehind:
private void Calendar1_DayRender (object sender,
System.Web.UI.WebControls.DayRenderEventArgs e)
{
// Display weekend dates in green boxes.
Style weekendStyle = new Style();
weekendStyle.BackColor = System.Drawing.Color.Green;
}
And I put this into InitializeComponent():
this.Calendar1.DayRender += new System.EventHandler(this.Calendar1_DayRender);
There's something I'm not doing right because I get a compile error:
....DayRenderEventArgs)' does not match delegate 'void System.EventHandler(object,
System.EventArgs)'
How does one work with the DayRender event?
Thanks for your help.