New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

File Selector Dialog

The example above shows how to create a simple File Selector Dialog. On Open button click a RadWindow containing a RadFileExplorer control is displayed. Once the user browses to a file and double clicks on it, the OnClientFileOpen event is fired and the selected file path is populated in the RadTextBox declared on the parent page.

  • DefaultVB.aspx
    • DefaultVB.aspx
    • Explorer.aspx
  • dialogscripts.js
    • dialogscripts.js
    • scripts.js
  • dialogstyles.css
<%@ Page Language="vb" AutoEventWireup="true"  %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <script src="scripts.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-narrow">
        <label for="fileName">Select a file:</label>
        <telerik:RadTextBox RenderMode="Lightweight" ID="fileName" runat="server" Width="300px" Skin="Silk">
            <ClientEvents OnLoad="textBoxLoad" />
        </telerik:RadTextBox>
        <telerik:RadButton RenderMode="Lightweight" ID="selectFile" OnClientClicked="OpenFileExplorerDialog" AutoPostBack="false"
            Text="Open..." runat="server" Skin="Silk"></telerik:RadButton>    
    </div>
    <telerik:RadWindowManager RenderMode="Lightweight" ID="theWindowManager" runat="server" Skin="Silk">
        <Windows>
            <telerik:RadWindow RenderMode="Lightweight" runat="server" Width="550px" Height="560px" VisibleStatusbar="false"
                ShowContentDuringLoad="false" NavigateUrl="Explorer.aspx" ID="ExplorerWindow"
                Modal="true" Behaviors="Close,Move">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>

    </form>
</body>
</html>

Support & Learning Resources

Find Assistance