ASP.NET Tip: Automatically Update your Copyright Date

January 10th, 2008 by Joe

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. ;)

kick it on DotNetKicks.com

Posted in ASP.NET, Internet, Joe, Web Development, technology

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

About Greener Living thru Technology

JoeLevi.com is the personal web log of Joe Levi -- an ASP.NET Web Developer by trade and by hobby. Joe's love of technology isn't just limited to the web, he's also interested in green and environmentally friendly technology and technological solutions. If it has to do with technology, improving the quality of life, geek humor, tech politics, self-defense, environmental stewardship, or anything related, you'll probably find it at www.JoeLevi.com.

Site statistics:
Average: ~1.3 P/V; Visits: ~3,000; Pageviews: ~3,600; Google PR: 4; TechnoratiAuthority: 17; Technorati Rank: 487,964





Watch the latest videos on YouTube.com