
I added a file upload inside an UpdatePanel using the following code:
<%-- File upload + other codes here -->
• When I try to get the selected file name using:
if (fuLoanConfirmation.HasFile)
{
string fileName = fuLoanConfirmation.PostedFile.FileName.ToString();
}
fuLoanConfirmation.HasFile always returns false.
I also set triggers for the UpdatePanel, but it still didn't work.
When I removed the UpdatePanel, it worked, but I need the UpdatePanel to be included.

Rajeesh MenothPosted Sep 3, 2024, 10:21 AM
Hi,
I don’t see any upload button in your ASPX file. If you are using PostBackTrigger, it will trigger the information. Refer to the following Stack Overflow reference for more details.
https://stackoverflow.com/questions/9682737/fileupload-hasfile-is-always-false