Home » FAQ » ASP.NET » Files » How to find the date and time the specified file or directory was last written to
Use namespace System.IO
VB.NET
dim path as string = Server.MapPath('page1.aspx') Response.Write ( File.GetLastWriteTime(path))
C#
string path =Server.MapPath('page1.aspx'); Response.Write ( File.GetLastWriteTime(path));
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with