creating Upload control dynamically in the code

2 posts, 0 answers
  1. P
    P avatar
    5 posts
    Member since:
    Jul 2011

    Posted 08 Aug 2011 Link to this post

    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.".

  2. Alex Fidanov
    Alex Fidanov avatar
    637 posts

    Posted 11 Aug 2011 Link to this post

    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 >>

Back to Top