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

Set targetfolder in radwindow

1 Answer 46 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
I. Breukink
Top achievements
Rank 1
I. Breukink asked on 27 Feb 2009, 02:20 PM
I have a radwindow with a radupload control. When i open this window, i supply the targetfolder for the files. I can't however not apply this argument. I have below a part of the aspx page

<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
<body onload="ConfigureDialog()" > <form runat="server" id="mainForm" method="post">  
 
<script type="text/javascript">  
function ConfigureDialog() {  
//Get a reference to the radWindow wrapper  
var oWindow = GetRadWindow();   
var oArg = oWindow.Argument;  
//Use the argument  
var upload = document.getElementById("RadUpload1");  
if (upload != null)  
upload.TargetFolder = oArg.DestDir;  
}  
</script> 
 
<asp:ScriptManager ID="ScriptManager1" runat="server" /> 
<rad:RadProgressManager ID="Radprogressmanager1" runat="server" /> 
<table style="position: relative;">  
<tr> 
<td id="controlContainer">  
<rad:RadUpload ID="RadUpload1" ControlObjectsVisibility="None" runat="server" OnValidatingFile="OnClientFileSelected" OnFileExists="OnFileExists" Skin="Vista" MaxFileInputsCount="5" TargetFolder="\\test" OverwriteExistingFiles="false" Width="285px" /> 
</td> 
</tr> 
</table> 
</form> 
</body> 
</html> 
 

 

 

I can see that the oArg.DestDir contains the value needed when the ConfigureDialog is called.

How can i solve this?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 02 Mar 2009, 04:00 PM
Hi I. Breukink,

Thank you for your question.

Consider adding additional information to your RadUpload via using additional fields. Thus way you can specify from the client side the target folder for every single uploaded file. For more information concerning adding additional fields please refer to this article. For your convenience I have prepared sample project describing your scenario.

I hope this helps.

Sincerely yours,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Upload (Obsolete)
Asked by
I. Breukink
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Share this question
or