RadUpload in RadWindow

4 posts, 2 answers
  1. orim
    orim avatar
    29 posts
    Member since:
    Mar 2012

    Posted 09 Oct 2012 Link to this post

    hi,
    i want to implement a small solution for uploading csv files.
    i put a radupload inside radwindow - Problem: i need to keep the radwindow open "onclick" the "Submit" button.
    I know i need a postback for radupload but Is there any solution to keep the radwindow open after postback.
    I triied it with ajax but it doesnt work
    Thanks
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 10 Oct 2012 Link to this post

    Hi Orim,

    Try the following code to achieve your scenario.

    ASPX:
    <telerik:RadWindow ID="RadWindow1" runat="server" NavigateUrl="Default.aspx" VisibleOnPageLoad="true">
      <ContentTemplate>
        <telerik:RadUpload runat="server"  ID="RadUpload1" AllowedFileExtensions="csv" TargetFolder="~/Uploads/">
        </telerik:RadUpload>
        <asp:Button runat="server" ID="Button1" Text="Upload" onclick="Button1_Click" />
      </ContentTemplate>
    </telerik:RadWindow>

    Hope this helps.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    rdmptn
    rdmptn avatar
    72 posts
    Member since:
    Aug 2011

    Posted 10 Oct 2012 Link to this post

    Or create a separate page for your RadUpload that you can load in the RadWIndow with its NavigateUrl property. It will be a separate context, so you an upload files independently from the main page.
  5. <span>w</span>
    <span>w</span> avatar
    84 posts
    Member since:
    Jun 2012

    Posted 13 Oct 2012 Link to this post

    hi Dear, Always take care mime type as well and don't overwrite your existing file.

    <telerik:RadWindow ID="RadWindow1" runat="server" NavigateUrl="Default.aspx" VisibleOnPageLoad="true">
      <ContentTemplate>
        <telerik:RadUpload runat="server"  ID="RadUpload1" OverwriteExistingFiles="false" AllowedMimeTypes="text/csv"  AllowedFileExtensions="csv" TargetFolder="~/Uploads/">
        </telerik:RadUpload>
        <asp:Button runat="server" ID="Button1" Text="Upload" onclick="Button1_Click" />
      </ContentTemplate>
    </telerik:RadWindow>

    Regards
    Muhammad Waseem
Back to Top