473,385 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

initializing a date in Calendar control with DayRender

I tried to initialize a date in Calendar control with DayRender event handler
as the following code:
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e){
e.Cell.ForeColor = System.Drawing.Color.Pink;
Calendar1.SelectedDate = new DateTime(2002, 7,16);
}
The first line works by seeing pink color.
The second line does not work, that is the data.
Please advise. Thanks.
Peter
May 25 '06 #1
1 1930
put the Calendar1 line in Page.Load
--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Peter" <Pe***@discussions.microsoft.com> escreveu na mensagem
news:3A**********************************@microsof t.com...
I tried to initialize a date in Calendar control with DayRender event
handler
as the following code:
protected void Calendar1_DayRender(object sender, DayRenderEventArgs
e){
e.Cell.ForeColor = System.Drawing.Color.Pink;
Calendar1.SelectedDate = new DateTime(2002, 7,16);
}
The first line works by seeing pink color.
The second line does not work, that is the data.
Please advise. Thanks.
Peter

May 25 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Greg | last post by:
How do you get rid of the days of the month that are not in the month selected in a calendar control? For example, I have a calendar control that shows November, at the beginning and end of the...
0
by: CodeRazor | last post by:
Hi, I have been using the DayRender event of the calendar control to format the appearance of my calendar control, and it works ok. However, because of the way the DayRender event works, it...
3
by: CodeRazor | last post by:
Hi, I have been using the DayRender event of the calendar control to format the appearance of my calendar control, and it works ok. However, because of the way the DayRender event works, it...
2
by: Bruce W..1 | last post by:
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...
3
by: Shevek | last post by:
Hi All, Hope someone can help! I am building an Event Calendar app based around the Calendar WebControl which builds an SQL string based on the SelectedDates property which is passed to...
2
by: VB Programmer | last post by:
How can I force the DayRender event of my Calendar to run/refresh? The calendar displays data from a database and I am allowing the user to filter out what data they see on the calendar. When...
1
by: Greg Ellis | last post by:
I'm trying to find a way to loop through the Calendar Control and add business days next to each day in the calendar after the SelectedDate. Example: if a user selects May 2nd 2005, I want the...
0
by: MattB | last post by:
Hello. I have a asp.net (1.1) application that uses the calendar control to sell event tickets. I use the DayRender event to make days selectable or not depending on the event's dates. I've found...
0
by: champagne.supernova1974 | last post by:
Hi Can anyone help with a quick question? I am adding a textbox into each "day" cell of a calendar control, by using the following code in the DayRender event: Protected Sub...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.