<asp:FileUpload ID="FileUpload1" runat="server" /> <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
// this is a aspx.cs file using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; public partial class we : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { DateTime creationTime = File.GetCreationTime(FileUpload1.FileName); Label1.Text =creationTime.ToString() ; } }
FileUpload1.FileName
DateTime creationTime = File.GetCreationTime(FileUpload1.PostedFile.FileName);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)