Hi, I have an asp.net web forms project. No master pages, no ajax, I have a file upload control and when I fire postback the HasFiles property is always empty. I started a new asp.net project. Copy/Pasted the code into it and it worked. HasFiles was retained. Does anyone know why? The code:
protected void Page_Init(object sender, EventArgs e)
{
if(IsPostBack) return;
}
protected void Page_Load(object sender, EventArgs e)
{
if(flImage.HasFile){
Application["FileBytes"] = flImage.FileBytes;
Application["FileContent"] = flImage.FileContent;
Application["FileName"] = flImage.FileName;
Application["PostedFile"] = flImage.PostedFile;
}
HasFile is always false.