protected void upload_button_click(object sender, EventArgs e) { if (file_upload_control.HasFile) { try { UploadedFile uf = new UploadedFile(file_upload_control.PostedFile); foreach (PropertyInfo info in uf.GetType().GetProperties()) { TableRow row = new TableRow(); TableCell[] cells = new TableCell[] {new TableCell(),new TableCell(),new TableCell()}; cells[0].Controls.Add(new LiteralControl(info.PropertyType.ToString())); cells[1].Controls.Add(new LiteralControl(info.Name)); cells[2].Controls.Add(new LiteralControl(info.GetValue(uf).ToString())); row.Cells.AddRange(cells); file_upload_details_table.Rows.Add(row); } status_label.Text = "Status: OK!"; } catch (Exception ex) { status_label.Text = "Status: The file could not be uploaded. The following error occured: " + ex.Message; } } }