Tuesday, January 1, 2008

How to track the last modified date /time of ASPX page?

One of our customer may ask “I want to see the last modified date or time of my web site. Just show it around the footer so somewhere”. Because, then customer can see the last modernize date/time of web site’s physical files. With ASP.NET, you can archive this with few lines of code.

FAQ00001

You can place above code inside the ASP.NET master page or ASP.NET web user control. Then you can catch the last modified date time of all ASPX pages from single location.

FYI: Above code doesn’t support for non ASPX pages or dynamic ASPX pages (like URL rewriting). So in that case you will have to have added way to track it. Like storing it in the database table or XML file.

Download source code : LastModifiedDateTime.zip

Labels: ,

0 Comments:

Post a Comment

<< Home