Hi
Once the form posted, you can access the uploaded files details though the file upload control's properties
1) Add a gridview, button, file upload control and a object datasource.
2) Create two classes as shown below
public class FileDetail
{
public string Name { get; set; }
public string Type { get; set; }
public int Length { get; set; }
}
public static class FileDetailCollection
{
public static IList<FileDetail> FileList =new List<FileDetail>();
public static IList<FileDetail> GetAll()
{
return FileList;
}
}
3) Configure the objectdatasource with the FileCollection object and the select method as GetAll
4)Set Gridview's (in my examble gridview4) datasource to the object data source created
5) In the button's click event (form submission) have the following code
HttpPostedFile postedFile= FileUpload1.PostedFile;
FileDetail fDetail = new FileDetail();
fDetail.Length = postedFile.ContentLength;
fDetail.Name = postedFile.FileName;
fDetail.Type = postedFile.ContentType;
FileDetailCollection.FileList.Add(fDetail);
GridView4.DataBind();