Clear file path from file upload control inside rad window

2 posts, 0 answers
  1. Venkatesh
    Venkatesh avatar
    88 posts
    Member since:
    Nov 2012

    Posted 12 May 2015 Link to this post


    I am using a Rad window, which contains a file upload control. I am trying to clear the file path, when the rad window is closed.

    Below is the aspx code:

    <telerik:RadWindow runat="server" ID="rwUpload" Title="UPLOAD"
            RestrictionZoneID="ContentTemplateZone" Width="400px" Modal="true" Behaviors="Close"
            VisibleStatusbar="false" MaxHeight="200px" OnClientClose="OnClientClose" ReloadOnShow="true"
                <telerik:RadWindowManager ID="rwmUpload" runat="server" EnableShadow="true">
                <div style="width: 380px; overflow: hidden" class="contButton">
                    <table style="margin-left: 30px; top: 30px;" width="340px">
                        <br />
                        <asp:FileUpload ID="FlupExceFile" Width="300px" runat="server" />
                        <br />
                        <br />
                        <asp:Label ID="lblMessage" ForeColor="red" runat="server"></asp:Label>
                    <br />
                    <table style="margin-left: 30px; vertical-align: bottom;" width="340px">
                        <tr valign="bottom">
                                <telerik:RadButton ID="btnUpload" runat="server" Text="Upload" OnCommand="btnUpload_OnCommand">

    I want to remove the file path using jquery/javascript when the rad window is closed.

    How to achieve this?


  2. Marin Bratanov
    Marin Bratanov avatar
    3908 posts

    Posted 12 May 2015 Link to this post

    Hi Venkatesh,

    You can use the OnClientClose event of the RadWindow: Here is a basic example that clears the selected path of a FileInput control:

    function OnClientClose(sender, args) {
        $get("<%=FlupExceFile.ClientID%>").value = "";

    On a side note - I recommend that you move the RadWindoManager out of the ContentTemplate of the RadWindow.


    Marin Bratanov

    See What's Next in App Development. Register for TelerikNEXT.

Back to Top