Valentin,
I added the parameters to the code and still no luck. The upload control going blank after the upload so there is still something missing. I am going to post my entire raduploadhandler code. As you can see, there is not much there right now.
FolderID and OrganizationID are two variables I am passing in the url to the page with the upload control.
AssetVersionID is the ID of the data that will be inserted into the sql table. On a side note, when the file is over 100k, I need to write the data into the sql table in chunks. I already have a stored proc to do that but now I need to pass the AssetVersionID back to the upload control as the raduploadhandler loses focus on each pass so I have to continually pass the AssetVersionID back to the contol so it can be passed back to the raduploadhandler on each pass.
The dict.Add(
"MyServerFolderID"..... code is just a test so disregard that line of code for now. I am not worried about error handling at this time. I just want to get the code working and then I'll add error handling.
Do you see what I am missing?
| using System; |
| using System.Collections.Generic; |
| using Telerik.Windows.Controls; |
| |
| public class RadUploadHandlerNoFile : Telerik.Windows.RadUploadHandler |
| { |
| string FolderID; |
| string OrganizationID; |
| private long AssetVersionID; |
| |
| public override Dictionary<string, object> GetAssociatedData() |
| { |
| var dict = new Dictionary<string, object>(); |
| |
| //collects the FolderID from the textblock (txtFolderID) on the fileupload.xaml file |
| FolderID = Request.Form["FolderID"]; |
| OrganizationID = Request.Form["OrganizationID"]; |
| |
| ////test to return folderid to xaml page |
| if (FolderID != null) |
| { |
| //returns this value to the textblock (txtServerFolderID) on the fileupload.xaml file |
| //this was for testing only and can be used to get values back to the xaml page |
| dict.Add("MyServerFolderID", String.Format("Server_Value[{0}]. The file name is [{1}]", FolderID, Request.Form[RadUploadConstants.ParamNameFileName])); |
| } |
| |
| return dict; |
| } |
| public override void ProcessStream() |
| { |
| byte[] assetData = Convert.FromBase64String(Request.Form["RadUAG_data"]); |
| |
| this.AddReturnParam(RadUploadConstants.ParamNameAssociatedData, ""); |
| |
| this.AddReturnParam(RadUploadConstants.ParamNameFinalFileRequest, this.IsFinalFileRequest()); |
| |
| this.AddReturnParam(RadUploadConstants.ParamNameSuccess, true); // or false if something fails |
| |
| this.AddReturnParam(RadUploadConstants.ParamNameMessage, "");// or add an error message if it is needed |
| |
| string fileName = this.Request.Form[RadUploadConstants.ParamNameFileName]; |
| |
| string filePath = this.GetFilePath(fileName); |
| |
| this.AddReturnParam(RadUploadConstants.ParamNameFileIdent, filePath); |
| |
| this.AddReturnParam(RadUploadConstants.ParamNameFileName, fileName); |
| |
| this.AddReturnParam(RadUploadConstants.ParamNameFilePath, filePath); |
| } |
| } |
| } |