如何在asp.net C#中使用label显示txt文件的修改日期 [英] How to display Modified date of txt file using label in asp.net C#
本文介绍了如何在asp.net C#中使用label显示txt文件的修改日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在使用asp.net,C#,SqlServer 2005.
在我的Systems D Drive中,我有一个txt文件。我想在asp.net c#中使用标签显示txt文件修改日期。
请帮助。
Hi everyone,
am working on asp.net,C#,SqlServer 2005.
In my Systems D Drive I have a txt file. Just I want to display txt file modified date using label in asp.net c#.
Please help.
推荐答案
检查此 File.GetLastWriteTime [ ^ ]
有用链接:文件创建 - 修改时间/ [ ^ ]
msdn [ ^ ]
Check this File.GetLastWriteTime[^]
useful links:file-creation-modification-time/[^]
msdn[^]
DateTime fileCreatedDate = File.GetLastWriteTime(@"C:\Documents and Settings\prasad\Desktop\points.txt");
lblModified.Text = fileCreateDate.ToString();</path>
这篇关于如何在asp.net C#中使用label显示txt文件的修改日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文