May 24, 2011

Dynamically change the year of copyright

In footer section i placed image of copyright in which 2011 year is mentioned. But its fixed, when 2012 comes footer reamins to 2011 year of copyright how can i change that year when new comes? i want to create a jQuery code for that purpose which pick the desire year pic according to current year and placed it to the footer section automatically because of this it save alot of time every year when changed.

Code is very simple use below code and makes your images name as 2011.png, 2012.png etc

CODE

<img src="/images/<%= DateTime.Now.Year %>.png" alt="Copyright" />