Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

I am facing an issue with FileUpload Control in ASP.Net 3.5.

I selected a file in FileUpload and in the same page there is a checkbox and which is causing postback on selected index changed. and on postback Fileupload is losing selected file.


I tried by using updatepanel and write the check box area in Update panel. but page is still cauisng postback.


Any help or suggestion will be appreciated.

Anything need to know more about this issue, please gimme a shout .

thanks.
Posted
Comments
Karthik_Mahalingam 20-Jan-14 7:16am    
try to put the file upload control in a seperate update panel
Mishra Laxmikant 20-Jan-14 7:38am    
thanks for your quick responce, But till yet, I have put checkbox only in update panel. and fileupload is out side
Mishra Laxmikant 20-Jan-14 8:15am    
Even i am not able to use ClientIDMode
JoCodes 20-Jan-14 9:50am    
Its a common issue related to the Fileupload control in 3.5 version . It needs a full postback , so try to add triggers.

Check this reference
http://www.aspsnippets.com/Articles/Using-FileUpload-Control-inside-ASP.Net-AJAX-UpdatePanel-Control.aspx
Mishra Laxmikant 21-Jan-14 1:06am    
probably i couldn't explain my problem properly, See FileUpload is lossing selected file just because of postback which is caused by Checkbox. Even i have put checkbox in separate updatepanel. So now problem is Updatepanel is letting postback the complete page in stead of partial.

Hope you got now. if you could suggest any solution, i will be thankful.

1 solution

try to put that filepath in session
and then get it back as the page backs from postback
 
Share this answer
 
Comments
Mishra Laxmikant 20-Jan-14 14:09pm    
Saddam, probably you may be right, but After postback i have show the selected file in file upload control as well. i tried to set fileupload controls on most of events if page, even on the Unload. but I found that FileUpload1.HasFiles shown true, which means fileupload selected file are getting lose after Page_Unload
Mishra Laxmikant 21-Jan-14 7:55am    
Sorry but, this is not working out.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900