This is a migrated thread and some comments may be shown as answers.

creating Upload control dynamically in the code

1 Answer 35 Views
Upload
This is a migrated thread and some comments may be shown as answers.
P
Top achievements
Rank 1
P asked on 08 Aug 2011, 11:23 PM
Hello,
First of all my objective is to be able to add file(s) using "Browse" button while the upload control is uploading other files. So basically, i want to be able to Append files to the list while the uploading is happening. Is that possible?

I want to have a button call "Browse here for files". After user selects some files and click on Ok, i want to start uploading file instantaneously and make the "Browse here for files" button available while uploading is happening in the background so the user can upload more files and append to the list. 

Any suggestions?

so far i added a silverlight link button and on the click event tried to create the RadUpload control and did ShowFileDialog() but that gives me an error "Dialogs must be user-initiated.".

thanks,

1 Answer, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 11 Aug 2011, 02:29 PM
Hello P,

The exception you are getting is because, the show file dialog must be initiated by an user's action - such as mouse button down or a Button's Click. If you are seeing this exception, this means that the link button's click is not considered as user initiated. Please try with a regular button.
Secondly, you would not be able to upload files and add more files to the same upload control. You can turn on the automatic upload feature, which will start uploading files as soon as they are selected. You could also use a second instance of the upload control to browse and add the new files.

Kind regards,
Alex Fidanov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
Upload
Asked by
P
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Share this question
or