Hm.. I had it almost the same except I didn't do MapPath:
(new FileInfo("web.config")).LastWriteTime was returning
year 1600. It works with MapPath though. I am just curios
now what's year 1600 about. Thanks for help.
-----Original Message-----
Would the last write time be appropriate? Not sure about
a standard way, but
here's one way:
Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim path As String = Server.MapPath("web.config")
Dim fi1 As System.IO.FileInfo = _
New System.IO.FileInfo(path)
Label1.Text = "Last update: " & _
fi1.LastWriteTime.ToLongDateString & _
" at " & fi1.LastWriteTime.ToLongTimeString
End Sub
Does this help?
Ken
MVP [ASP.NET]
--
Microsoft MVPs have a question for *you*: Are you patched
against the Worm?
http://www.microsoft.com/security/security_bulletins/ms03-
026.asp
hello, I need to display the last time the site was
updated: I am trying to get FileInfo from web.config and
get a last modified year of 1600.
How do I get this info, is there a standard way?
Thank you
.