access fileexplorer with javascript

3 posts, 1 answers
  1. Ronen
    Ronen avatar
    29 posts
    Member since:
    Aug 2010

    Posted 08 Aug 2010 Link to this post

    how do i access the filename selected in fileexplorer using javascript and put in in my asp label?
  2. Answer
    Rumen avatar
    14466 posts

    Posted 11 Aug 2010 Link to this post

    Hi Ronen,

    Here is a code example which demonstrates how to display the name of the selected RadFileExplorer item in a span element:

    <script type="text/javascript">
        function OnClientItemSelected(sender, args) {
            var fileNameLabel = $get("FileNameLabel");
            var imageSrc = args.get_item().get_name();
            fileNameLabel.innerHTML = imageSrc;
    <telerik:RadFileExplorer runat="server" ID="FileExplorer1" Width="520px" Height="520px"
        <Configuration ViewPaths="~/Images" UploadPaths="~/Images" DeletePaths="~/Images" />
    <br />
    The selected file name is: 
    <span runat="server" id="FileNameLabel"></span>

    For your convenience I have attached my test files.

    Best regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Ronen
    Ronen avatar
    29 posts
    Member since:
    Aug 2010

    Posted 11 Aug 2010 Link to this post

    thanks, i already manged to do that using:


    function fillFileName(sender, args) {



    var label = document.getElementById('<%=TextBoxFileName.ClientID%>');



    if (label != null)


    label.innerText = args.get_item().get_path();

    OnClientItemSelected(sender, args);


Back to Top