harriyott.com

15 May 2007

Copyright trick for websites

Don't you just hate it, every January having to update your website as the copyright notice is out of date? Well, there's a really simple trick to save yourself the trouble. Simply get the year from the current date in code, and never update it again:

&copy; <%= DateTime.Now.Year.ToString() %>

[Tags: ]

1 Comments:

Anonymous Anonymous said...

That's assuming that the page in question is changed every year, otherwise it would very misleading.

Post a Comment