File Upload does not work on modal
I am creating a C# web application (.aspx) that has the capability to upload files (any type of file will do as long as it has the capability to upload) and it is a requirement that this upload be put in a modal pop up. I am using asp:File Upload inside a panel to upload files and a jquery to transform the panel into a modal popup.
The issue that bothers me about my code is that the file upload does not work – it does not recognize the file I browsed. It always returns a boolean false on the condition .HasFile. My code behind works when put in a .aspx page but does not work when I transferred it in a modal pop up so I know that the main problem is not my code behind but lies in the modal. I don't know why it can't recognize a file browsed. Please see the code below for a clearer view of the problem. Thanks.