I am using Silverlight MultiFile Upload Control For uploading multiple files and also using radupload when silverlight is not install on machine so how i can work both of these and in c# how i can save the file if these both are diffrent.
<
telerik:RadAjaxPanel runat="server" ID="AjaxPanelMain" LoadingPanelID="LoadingExamplePanel" EnableAJAX ="true">
<asp:Panel runat="server" ID="Panel1" Visible="true">
<input type="hidden" id="UploadedFilesJson" runat="server" />
<div class="upload-panel">
<div class="upload">
<object id="SilverlightUpload" data="data:application/x-silverlight," type="application/x-silverlight-2"
width="400px" height="120px">
<param name="source" value='<%= ResolveUrl("~/Upload.xap") %>' />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="2.0.31005.0" />
<param name="autoUpgrade" value="true" />
<param name="windowless" value="true" />
<param name="InitParams" value='<%= InitParameters %>' />
<a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight"
style="border-style: none" />
</a>
<telerik:RadUpload ID="radUpload" ControlObjectsVisibility="All"
AllowedFileExtensions=".stl,.zip"
MaxFileSize="80000000"
runat="server" InitialFileInputsCount="5">
</telerik:RadUpload>
</object>
<div class="uploaded-files" >
</div>
</div>
</div>
</asp:Panel>
</telerik:RadAjaxPanel>
this code is giving me a javascript error, So please help me ho i can save the file in a folder.If i am using foreach loop than how i will use silverlight control for same.
foreach (Telerik.Web.UI.UploadedFile file in radUpload.UploadedFiles)
{
int position = file.FileName.LastIndexOf("\\");
string fileName = (position == 0 ? file.FileName.Substring(position) : file.FileName.Substring(position + 1));
string filePath = Server.MapPath(m_path + "/" + orderIdPath + fileName);
file.SaveAs(filePath);
}
Please Help me out this problem.
thanks,