I am trying to add the names of the uploaded files to an array
But it doesn't work. What I am doing wrong
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
namespace CookWithoutBookProject.Pages
{
public partial class Test : System.Web.UI.Page
{
ArrayList allPhotoFiles = null;
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
allPhotoFiles = new ArrayList();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
FileUpload1.SaveAs("~/Images/" + FileUpload1.FileName.ToString());
allPhotoFiles.Add("~/Images/" + FileUpload1.FileName.ToString());
}
}
}
< ...
Go to the complete details ...