如何在ASP.NET C#中为修改后的文件名添加时间戳 [英] How to add time stamp to modified filename in ASP.NET C#

查看:390
本文介绍了如何在ASP.NET C#中为修改后的文件名添加时间戳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个日历控件1个Gridview控件。当用户从日历控件中选择日期数据在网格视图中显示在选定的月份之间。到目前为止还不错。我有[Filename],[UploadDate],[ProcessedDate]列。我可以在ProcessedDate列中编辑日期。现在,当我更新处理日期列时,我必须这样做,修改日期应自动附加到所选文件的文件名。我怎样才能做到这一点。我不想手动添加修改日期。



我尝试过:



我尝试过使用DateTime.Now.ToString()

I have 2 Calendar Controls 1 Gridview control. when user Select Dates from calendar controls Data is displayed in gridview for between selected months. so far is good. I have [Filename],[UploadDate],[ProcessedDate] columns. I am able to edit the date in ProcessedDate column . now i have to do when i update the processed date column that modified date should automatically append to Filename for selected File . how can i achieve this. i don't Want to append modified Date manually.

What I have tried:

I have tried using DateTime.Now.ToString()

推荐答案

再次,谷歌是你的朋友: asp.net网格日期范围 - Google [ ^ ]



在几秒钟内找到:根据最小值和过滤GridView ASP.Net中的最大日期范围| ASPForums.Net [ ^ ]
Again, google is your friend: asp.net grid date range - Google[^]

Found this in a few seconds: Filter GridView based on Minimum and Maximum Date Ranges in ASP.Net | ASPForums.Net[^]


这篇关于如何在ASP.NET C#中为修改后的文件名添加时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆