File Upload does not work on modal

Asked By 10 points N/A Posted on -
qa-featured

Good day!

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.

SHARE
Answered By 0 points N/A #111054

File Upload does not work on modal

qa-featured

Dear melody,

You are right that there is a problem of your model and the best solution is that you can recreate or reinstalled that model program it will help you to solve your problem. Another solution for you is that some times these type of files automatically saved a file in a hidden mode and one can never show it again after saving without remove the restriction of hidden of files .

So firstly you should confirm that either your file is ok or it is hidden and this thing you can check by open the properties of that file where it is present and then there you find an option of hidden then uncheck that box and then do upload again that file. Hope this thing help you a lot to fix your problem.

 

THANKS.

Related Questions