473,394 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

File date as runtime...

EMW
Hi,

Is it possible to get the date on which the aspx file was created/last saved
at runtime?

rg,
Eric
Nov 18 '05 #1
2 1056
Hi Eric
I have posted the reply but does not see it so again replying back to your thread

its is possible to do it during run time

take any page and put the following code in page_load method of the page and it should serve what u need

PS: you need to include System.IO namespace

private void Page_Load(object sender, System.EventArgs e

// Put user code to initialize the page her

FileInfo myfileinfo = new FileInfo(Server.MapPath(Request.ServerVariables["SCRIPT_NAME"]))
Response.Write(" File Name : " +myfileinfo.FullName +"<br>")
Response.Write( "Creation Time :" + myfileinfo.CreationTime.ToString()+"<br>")
Response.Write( "Last Updated Time:" + myfileinfo.LastWriteTime.ToString()+"<br>")

HT
Ashish M Bhonkiy

----- EMW wrote: ----

Hi

Is it possible to get the date on which the aspx file was created/last save
at runtime

rg
Eri

Nov 18 '05 #2
EMW
Thank you!

rg,
Eric

"Ashish M Bhonkiya" <bh******@hotmail.com> schreef in bericht
news:2D**********************************@microsof t.com...
Hi Eric,
I have posted the reply but does not see it so again replying back to your thread.
its is possible to do it during run time.

take any page and put the following code in page_load method of the page and it should serve what u need.
PS: you need to include System.IO namespace.

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here

FileInfo myfileinfo = new FileInfo(Server.MapPath(Request.ServerVariables["SCRIPT_NAME"])); Response.Write(" File Name : " +myfileinfo.FullName +"<br>");
Response.Write( "Creation Time :" + myfileinfo.CreationTime.ToString()+"<br>"); Response.Write( "Last Updated Time:" + myfileinfo.LastWriteTime.ToString()+"<br>");
}

HTH
Ashish M Bhonkiya

----- EMW wrote: -----

Hi,

Is it possible to get the date on which the aspx file was created/last saved at runtime?

rg,
Eric

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Raskolnikow | last post by:
Hi! I have some beginner questions about C++, so please be gentle if the things I ask are trivial. What I want to do is a program that - changes the current (system) date, - calls an...
10
by: Chris | last post by:
Hi, Not sure if this is the right forum, but hopefully someone can help me. I am creating something for our intranet and i want to list the files and folders of a directory, i found some code...
2
by: Paul | last post by:
I'm hoping someone can help me with the problem. I have a database where the default value for a date field in a table is =date() This works perfectly in my table and on my form. But when I...
2
by: EMW | last post by:
Hi, Is it possible to get the date on which the aspx file was created/last saved at runtime? rg, Eric
6
by: Paul | last post by:
Hi there, When adding a "File Field" HTML control to an aspx page to facilitate file uploading, the following occurs: 1. You select a file that is larger than the allowed size limit. 2. Once...
0
by: bruce | last post by:
ASP.NET app running for about a year with no problem and suddenly this week it's giving error message. The same as the one decribed by another user. Even stranger is that we only have this problem...
0
by: troutbum | last post by:
I am experiencing problems when one user has a document open through a share pointing to the web site. I use the dsolefile to read the contents of a particular directory and then display them in a...
116
by: dmoran21 | last post by:
Hi All, I am working on a program to take input from a txt file, do some calculations, and then output the results to another txt file. The program that I've written compiles fine for me, however,...
12
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
4
by: Salad | last post by:
I have a situation where some, not all, users get the message "Couldn't find file "F:\AccessApps\AppName.mdw". This file is required for startup". My app the users are attempting to access is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.