ComponentOne FileExplorer for ASP.NET Web Forms
Explore Features / Disable File Operations
In This Topic
    Disable File Operations
    In This Topic

    All file operations are enabled by default but you can disable the Copy, New Folder and Open file operations.

    In Design View

    1. In Visual Studio, right click FileExplorer and select Properties.
    2. In the Properties Window,
      • Set the EnableCopy property to False, to disable the files and folders from being copied.
      • Set the EnableCreateNewFolder property to False, to disable users from creating new folders.
      • Set the EnableOpenFile property to False, to disable users from opening files.

    In Source View

    Set the EnableCopy, EnableCreateNewFolder and EnableOpenFile properties to False in the <cc1:C1FileExplorer> tag, to disable files and folders from being copied, to disable users from creating new folders and disable users from opening files.

    <cc1:C1FileExplorer ID="C1FileExplorer1"  runat="server" VisibleControls="All"  ViewPaths="Example" EnableCopy="false" EnableOpenFile="false" EnableCreateNewFolder="false">
    

    In Code

    Add the following code to the Page_Load event to disable files and folders from being copied, to disable users from creating new folders and disable users from opening files.

    To write code in C#

    C1FileExplorer1.EnableCopy = false;
    C1FileExplorer1.EnableCreateNewFolder = false;
    C1FileExplorer1.EnableOpenFile = false;
    

    To write code in Visual Basic

    C1FileExplorer1.EnableCopy = False
    C1FileExplorer1.EnableCreateNewFolder = False
    C1FileExplorer1.EnableOpenFile = False