Click here to Skip to main content
15,910,603 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi frnds,

how to display folder copied date in asp.net label.

please help us .

thank you very much.
Posted
Comments
Mukesh Ghosh 8-Jul-13 7:12am    
Can you explain bit, what exactly your requirement?

1 solution

C#
DirectoryInfo fi1 = new DirectoryInfo("Directory Path");
DateTime created = fi1.LastWriteTime;
Label.Text = created.ToString(System.Globalization.CultureInfo.InvariantCulture);
 
Share this answer
 
Comments
Member239258 8-Jul-13 7:47am    
Hello Sir, Where should i write this code. in CODE BEHIND.
In page load or ?
Sushil Mate 8-Jul-13 7:48am    
in cs file, When page loads or when you copy something in the directory.
Member239258 9-Jul-13 4:29am    
its is displaying like this

01/01/1601 03:00:00

I need to display File modified date and Time.

thanks in advance.
Sushil Mate 9-Jul-13 4:47am    
That's right, its the time when your file is modified.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900