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

Files arent getting uploaded

3 Answers 79 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Kishan A
Top achievements
Rank 1
Kishan A asked on 02 Nov 2009, 11:55 AM
Hi,
 I am trying to upload files (.zip/.doc of max size 250MB). But not being able to upload. RadUpload.UploadedFiles.Count is always 0.

Can somebody please help me with this?

PFB my code :

aspx :
 <telerik:RadUpload ID="RadUpload" Runat="server"  

 

ControlObjectsVisibility="None"

 

OverwriteExistingFiles="false"

 

 

 

AllowedFileExtensions=".zip" ForeColor="#00CC00" MaxFileSize="409600"

 

 

 

MaxFileInputsCount="1" TargetFolder="~/bin">

 

 

 

</telerik:RadUpload>

 

 

 

 

 


.cs :

protected

 

void btnUploaded_Click(object sender, EventArgs e)

 

 

 {

 

if (rulTaxForms.UploadedFiles.Count> 0)

 

 

 {

 

 

 }

 

3 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 04 Nov 2009, 03:23 PM
Hello Kishan A,

Everything looks correct with your code. It is kind of strange that there are no files in the UploadedFiles collection. Is your upload nested inside RadAjaxPanel or UpdatePanel? Can you try to obtain the uploaded files using Telerik.Web.UI.RadUploadContext.Current.UploadedFiles files. Is there change in the situation?

Sincerely yours,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Michael
Top achievements
Rank 1
answered on 05 Nov 2009, 05:48 PM
I get the same thing. The upload context comes up null.        

Telerik.Web.UI.RadUploadContext.Current.UploadedFiles    'Telerik.Web.UI.RadUploadContext.Current' is null    Telerik.Web.UI.UploadedFileCollection

Mine is in a grid, FormTemplate.
0
Michael
Top achievements
Rank 1
answered on 05 Nov 2009, 09:10 PM
Min IS in an AJAX Panel. Wound up using the workaround. All is well now...
Tags
Upload (Obsolete)
Asked by
Kishan A
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Michael
Top achievements
Rank 1
Share this question
or