Open radwindow with contenttemplate and after change object inside

2 posts, 0 answers
  1. Fabio Cirillo
    Fabio Cirillo avatar
    179 posts
    Member since:
    Jan 2010

    Posted 10 Jan 2013 Link to this post

    i've created a radwindow with contenttemplate.In this radwindow there's a radasyncupload that i sue for upload image. After this process i want to see the image always in this radwindow. I've two questions:

    1) Can i use into radwindow with contenttemplate after process upload the property navigateurl so i load another page where i see the image uploaded.

    2) How can to see the image into radwindow after upload process?

  2. Marin Bratanov
    Marin Bratanov avatar
    3555 posts

    Posted 11 Jan 2013 Link to this post

    Hi Fabio,

    Once the mode of a RadWindow is chosen it stays in it. You cannot load a page in a RadWindow that already uses its ContentTemplate and vice versa. You can, however, create a new, dynamic instance, by using a RadWindowManager that will load the desired page. You do not even need a postback for this, it can happen on the client-side:

    On previewing images - there is a way to get this done by using an update panel in the content template. Below follows an example, but please note that this is generally a scenario that should be avoided. We are working on allowing the developer to add a preview on the client, so  you may find that useful. Stay tuned and look out for the RadAsyncUplaod demos once the Q1 2013 release is out.

    <telerik:RadWindow ID="FirstRw" runat="server" Title="First">
            <asp:UpdatePanel ID="Updatepanel1" runat="server">
                <telerik:RadAsyncUpload runat="server" ID="rau1" TargetFolder="~/Images"></telerik:RadAsyncUpload>
                    <asp:Image ID="Image1" ImageUrl="" Visible="false" runat="server" />
                    <asp:Button ID="Button3" Text="Upload File and set to Image" runat="server" />
    Protected Sub rau1_FileUploaded(sender As Object, e As Telerik.Web.UI.FileUploadedEventArgs) Handles rau1.FileUploaded
        Image1.ImageUrl = "~/Images/" & e.File.FileName
    End Sub
    Protected Sub Button3_Click(sender As Object, e As System.EventArgs) Handles Button3.Click
        Image1.Visible = True
    End Sub

    Marin Bratanov
    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top