1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
foreach (RepeaterItem item in rptSteps.Items)
{
// Récupération des différentes valeurs de l'étape en cours
TextBox stepNumber = item.FindControl("TxtStepNumber") as TextBox;
TextBox stepDescription = item.FindControl("TxtStepDescription") as TextBox;
TextBox stepExpectedResult = item.FindControl("TxtStepExpectedResult") as TextBox;
FileUpload stepScreenshot = item.FindControl("TxtStepScreenshot") as FileUpload;
string fileName = string.Empty;
// ICI, stepScreenshot.HasFile = False, alors qu'il y a bien un fichier...
if (stepScreenshot.HasFile && stepScreenshot.PostedFile.ContentLength > 0)
fileName = stepScreenshot.FileName;
else
fileName = "Pas de fichier";
} |
Partager