13.07.2015 Views

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

254<strong>ASP</strong>.<strong>NET</strong> <strong>3.5</strong>: A Beginner’s <strong>Guide</strong>Try Thisare among the values that are returned through the parameter (where e is the instance ofDayRenderEventsArgs):e.Day.Date.DayOfWeekProperty holding the day name (e.g., Monday)e.Day.Date.DayNumber of the day of the monthe.Day.Date.Month Number of the month (1–12)You can use the values for creating in-calendar reminders of appointments, special days,or any other kind of one-time or repeated events.Using the DayOfWeek PropertyThis next example uses the DayOfWeek property to set up repeated events. The followingsteps get you started:1. Open a new Web Site, and set the editor view to Split.2. Drag a Calendar control into the editor, and place it in the container.3. Select the Calendar control and set the AutoFormat to Classic. Then change the Calendar’sfont-family to Verdana in the Properties window and its width to 800. The width ofthe calendar is increased so that it has room to ac<strong>com</strong>modate different text reminders.4. In the Source portion, add OnDayRender="CheckApps" to the Calendar tag.Complete the application using the code in the following <strong>ASP</strong>.<strong>NET</strong> and C# listings:<strong>ASP</strong>.<strong>NET</strong> CalMind.aspxBirthday Note

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!