Joe Levi:
a cross-discipline, multi-dimensional problem solver who thinks outside the box – but within reality™

ASP.NET Tip: Automatically Update your Copyright Date

If you’re like me you’ve got a whole slew of web pages that you’ve developed. That means you’ve got a lot of pages to modify every year to update the copyright to reflect the new year.

Instead of hard-coding the year in to your xhtml, replace it with the following code snippet and you’re all set!

   1:  <%= System.DateTime.Today.Year.ToString() %>

You can thank me later. 😉

Share

You may also like...

1 Response

  1. Nick says:

    Worked perfectly, thanks!

Leave a Reply