question on calendar control

buggiez

Member
Joined
Feb 7, 2006
Messages
18
Location
Singapore
Programming Experience
1-3
hi all. sorry for the trouble again i seem to have too many questions in here yea.

by the way. i would like to ask if anybody know how to display the dates of a certain week, just be selecting a particular date from the calendar control in asp.net.

for example if i clicked on 10th feb, it will display all the dates within this week(i.e 5feb, 6feb, 7feb, 8feb, 9feb, 10feb, 11feb)

i have thought of adding days, but that will need alot of if-then-else statements.


hope any1 in here would help...


thanks in advance sincerely~

valerie
 
hmmm... i sort of figured out the dates within the week by having if-then-else statements...



If todayDate.DayOfWeek = DayOfWeek.Sunday Then
startDate = todayDate
endDate = todayDate.AddDays(6)

..............

something like that...

it works, but is there any easier way?


by the way i have another problem... i want to determine the YEAR of the selected date.. any idea how do i do it? there is only .DayofYear and .Year property... i've read it in msdn but i still couldnt figure out how i can do that...

hope any kind soul helps... thanks in advance =)



valerie
 
Back
Top