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

How to use Upload control programatically

1 Answer 122 Views
Upload
This is a migrated thread and some comments may be shown as answers.
malebo
Top achievements
Rank 1
malebo asked on 31 Mar 2009, 09:23 AM
Hi there,
I need to upload the file to the server programmatically without adding the control to my xaml. But my code is failing:


RadUpload
uploader = new RadUpload();

On page load

 

uploader.BufferSize = 100000;  

uploader.MaxFileSize = -1;

uploader.MaxUploadSize = -1;

uploader.UploadServiceUrl =

"http://localhost:56176/RadUploadHandler.ashx";  

 

 

uploader.Filter =

"CSV Files (*.csv)|*.csv|All files (*.*)|*.*";  

 

 

uploader.IsPauseEnabled =

false;  

 

 

uploader.IsMultiselect =

false;  

 

 

uploader.MaxFileCount = 1;

uploader.OverwriteExistingFiles =

true;  

 

 

uploader.TargetFolder =

"UserUploads";

I have my own browse button and inside the click event i have this code

 

 

uploader.ShowFileDialog();

And in my upload event button this code:
uploader.StartUpload();

but upload is not happening please help

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 02 Apr 2009, 05:28 PM
Hi malebo,

The approach you have chosen is very interested and it is still workable - we have the right article (with example) for you: How to use the RadUpload programatically.

Just give it a try and let me know if other questions arise.

Kind regards,
Ivan
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Upload
Asked by
malebo
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Share this question
or