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

Problem with start radupload

1 Answer 37 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Fabio Cirillo
Top achievements
Rank 1
Fabio Cirillo asked on 29 Nov 2012, 12:22 PM
Hi,
i've into web page a radupload...now in my vb code:

Protected Sub Imgbtnesci_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles Imgbtnesci.Click
    Me.ClientScript.RegisterStartupScript(Me.GetType, "", "Close_and_load();", True)
End Sub
 
Protected Sub CustomValidator1_ServerValidate(source As Object, e As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate
    e.IsValid = (RadUpload1.InvalidFiles.Count = 0)
End Sub
 
Protected _image As String
Private Sub Imgbtnupload_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles Imgbtnupload.Click
    If RadUpload1.UploadedFiles.Count > 0 Then
        _image = "/public/image_profile/" & RadUpload1.UploadedFiles.Item(0).FileName
        Label2.Text = "/public/image_profile/" & RadUpload1.UploadedFiles.Item(0).FileName
    Else
        Label2.Visible = True
    End If
End Sub
 
function GetRadWindow() {
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow;
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
    return oWindow;
}
function Close_and_load() {
       GetRadWindow().close();
}

when i click on button imgbtnesci, the upload is also, however you need to start only if I click on the button Imgbtnload...
how do it?

Bye

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 04 Dec 2012, 09:07 AM
Hi,

 
In such cases we recommend using RadAsyncUpload where the PostbackTriggers controls whether the files will be uploaded or not by some buttons click event.

Hope this will be helpful.

All the best,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Upload (Obsolete)
Asked by
Fabio Cirillo
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or