Author: jeanclaudeT | Posted on: 7/28/2009 10:44:09 AM | Views : 402

I am doing a simple file upload application and my application crashes each time when I press submit button. below is the code and the server error message. 


string extension1 = Path.GetExtension(FileUpload1.PostedFile.FileName).ToLower();

        ArrayList attachments = new ArrayList();

        if (FileUpload1.HasFile && (
          extension1 == ".gif" ||
            extension1 == ".png" || extension1 == ".tiff" ||
            extension1 == ".jpeg" || extension1 == ".jpg"))
            attachments.Add(FileUpload1.PostedFile.FileName);

      &n ...

Go to the complete details ...