Using CSS to Control Calendar Display

One of the strongest selling points for moving to the .NET platform is the separation of code from presentation markup. One of the easiest ways to separate what your forms do from what they look like is by using Cascading Style Sheets (CSS). Listing 7.11 demonstrates how you can create cleaner, easier-to-manage code while garnering even more control over the display properties of the Calendar control.

Listing 7.11. Changing the look of the Calendar control by using CSS (7cal06.aspx).
 <%@ Page language="VB" autoeventwireup="false"%> <html> <head> <title>Chapter 7: ASP.NET Rich Controls</title> <style> .Cal { font-family: Verdana; font-size: 8pt; border-top: solid 1 black; border-bottom: solid 1 black; border-left: ...

Get ASP.NET by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.