Hi there,
I need to upload the file to the server programmatically without adding the control to my xaml. But my code is failing:
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