Adsence750x90

Friday, June 6, 2008

How to Change ASP.Net Calendar Control to show Next Month

if we place a Calendar Control in ASP.NET page, its Shows current month and date.Then how can we set that month in to next month?, its possible to set current month to next month, the following c# code that change this month problem.

C# ASP.NET code to Change to set month vale to next month

DateTime nextMonth = DateTime.Now.AddMonths(1);
Calendar1.TodaysDate = nextMonth;
DateTime nextOfNextMonth = DateTime.Now.AddMonths(2);
Calendar2.TodaysDate = nextOfNextMonth;

3 comments:

Anonymous said...

Fantastic! Many Thanks!

Innovative Web Developer said...

Thanks a lot for this post. It helps me a lot... :)

IT Tutorials said...


It is really a great work and the way in which u r sharing the knowledge is excellent.
Thanks for helping me to understand basic concepts. As a beginner in Dot Net programming your post help me a lot.Thanks for your informative article.
Dot Net Training in chennai | Dot Net Training in velachery