File upload control get blank

Posted by Shoyeb under ASP.NET on 4/1/2015 | Points: 10 | Views : 302 | Status : [Member] | Replies : 2

I am facing a problem that in my page there is several controls , like gridview , webcam image upload , file upload, dropdowns etc, i placed all of these controls in update panel , now when selecting checkbox in gridview there values calculates in footer ( using javascript) , if i chose file using file upload then path is show in fileupload control, now when i open web cam it open new modal window for web cam , the footer of gridview get blanked althogh there is check box is checked , file upload also get blanked , but all remaining control had there value .

what is the solution to remain file path ???


Posted by: Rajnilari2015 on: 4/3/2015 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

Without looking at your code, it is very difficult to state the real cause of the problem. However, the below are some suggestions that you can measure from your end.

a) Check if Postback is happening or not. If so, then you need to stop it and have to capture the value.

b) If you cannot stop the Postback, then store the path value before the postback to some Viewstate or something similar and set it back after the postback.

Hope this help help you. If not please let me know (step by step) what you are doing and what is happening with some code snippet.

Thanks & Regards,
RNA Team

Shoyeb, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 4/3/2015 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Since you are calculating the fotter in Javascript , press F12 to check if there is no Javascript Error when its time to calculate. Now when you use Update Panel you might get issues

Thank you for posting at Dotnetfunda

Shoyeb, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response