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

"About RadUpload Control"

5 Answers 105 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Rahul Khinvasara
Top achievements
Rank 1
Rahul Khinvasara asked on 12 Jan 2009, 08:06 AM
Hi,

I am using Rad Upload control for uploading image.User can browse image by this.
Bt I dont want 'add' , 'delete' and 'remove' buttons below browse button which comes bydefault .user can upload only one image at a time.
How can i do this?..
I am saving  the image which user has browsed..I want to allow all image type to browse.Now it only allows me to browse .jpeg images... 
Here is my code...
 <telerik:RadUpload 
                                ID="UploadFile" runat="server"  
                                Skin="Vista" 
                                MaxFileInputsCount="5" 
                                TargetFolder="~/ProfileImage" 
                                OverwriteExistingFiles="false"  InitialFileInputsCount ="1"  /> 
 <asp:Button id="btnPreview"  style="font-weight:bold;height:22px; width: 80px;"  CssClass="btn" runat ="server"  
             Text ="Submit" OnClick="btnPreview_Click"  CausesValidation ="false" /> 
 
 
 protected void btnPreview_Click(object sender, EventArgs e) 
    { 
        foreach (UploadedFile f in UploadFile.UploadedFiles) 
        { 
            string ffilepath = f.GetName(); 
            ObjuserModelCs.proc_insert_UpdateLoginImage(Convert.ToInt32(Session["WebsiteUserId"].ToString()), filepath); 
            previewField.ImageUrl = filepath
        } 
     } 

Waiting for reply!!!

Thanks.

5 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 12 Jan 2009, 09:00 AM
Hi Rahul,

You can easily achieve your goal using the ControlObjectsVisibility property of the control.

Sincerely yours,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Princy
Top achievements
Rank 2
answered on 12 Jan 2009, 09:48 AM
Hello Rahul,

You can also refer to the following online demo to understand better how to customize the look of RadUpload.
Customizing RadUpload UI

Thanks
Princy.
0
Rahul Khinvasara
Top achievements
Rank 1
answered on 12 Jan 2009, 10:13 AM
HI,
Thank you for your early reply...It helped me.
But how can i allow all image types to upload?
Now i hav given ,
AllowedFileExtensions =".jpeg,.jpg,.gif," But is still not working .And i am not able see all types of imags.
Thank you...
0
Veselin Vasilev
Telerik team
answered on 12 Jan 2009, 10:18 AM
Hi Rahul Khinvasara,

You need to set the AllowedFileExtensions property.

All the best,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rahul Khinvasara
Top achievements
Rank 1
answered on 12 Jan 2009, 10:54 AM
HI,
I hav sent you my code.I hav made changes ...
<telerik:RadUpload
                                ID="UploadFile" runat="server"
                                Skin="Vista"
                                MaxFileInputsCount="5"   AllowedFileExtensions=".gif,.jpg,.jpeg"
                                TargetFolder="~/ProfileImage" ControlObjectsVisibility ="None"
                                OverwriteExistingFiles="false"  InitialFileInputsCount ="1"   />
but still its not working..I am not able to see the images other than .jpeg..What may be the problem??

Thanks.
Tags
Upload (Obsolete)
Asked by
Rahul Khinvasara
Top achievements
Rank 1
Answers by
Paul
Telerik team
Princy
Top achievements
Rank 2
Rahul Khinvasara
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or