0

I have a silverlight multi-file upload control in a page with a drop-down list. When i select some files in multi-file upload control and change the value in drop-down list it makes a postback coz of which i loose all the selected images. Is there any way i can prevent the multi-file upload control to loose images during postbacks?

user728630
  • 2,025
  • 5
  • 22
  • 35

1 Answers1

0

The best way is probably to not have the drop-down list trigger a post-back by setting AutoPostBack="false". If you still need to process some stuff server-side when the drop-down list changes, you could wrap it in an UpdatePanel (see here for some details about making this work).

But if that doesn't work for you for some reason, your best option would be to store the state of the upload control in IsolatedStorage, so that whenever someone made a change, i.e., added a file, successfully uploaded it, etc., you updated your state in IsolatedStorage. And then when the control loads, you can read your state, and immediately go back to where you left off.

Community
  • 1
  • 1
Ken Smith
  • 20,305
  • 15
  • 100
  • 147