This is a migrated thread and some comments may be shown as answers.

File Explorer not work in .ascx page

1 Answer 67 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Mostafa
Top achievements
Rank 1
Mostafa asked on 07 Aug 2017, 12:39 PM

Hi 
i add File Explorer in my .ascx page .it works fine in my local server but when i upload it in to Server Id dose not work. when i click on tree list item it give me error "post : www.myweb.com" not find 500 internal error .

--------------------------------
 <telerik:RadFileExplorer  Skin="Metro" RenderMode="Lightweight" runat="server" ID="FileExplorer1" Width="100%" Height="500px" Configuration-EnableAsyncUpload="false" EnableAsyncUpload="false"
                OnClientItemSelected="OnClientItemSelected" OnClientDelete="OnClientDelete" TreePaneWidth="250px"  OnClientLoad="RadFileExplorer_OnClientLoad" >
               
              
                
            </telerik:RadFileExplorer>
        </div>
                      <div class="ImgPreviewArea">
                <h2>Preview</h2>
                <img id="pvwImage" src="Images/Northwind/Flowers/Flower1.jpg" alt="Flower1.jpg" />
        </div>
                     </div>
------------------------------------------------

 protected void Page_Load(object sender, EventArgs e)
        {
          
            System.Web.UI.ScriptManager.GetCurrent(this.Page).RegisterPostBackControl(FileExplorer1);
          
                    var edata = new ExportData();
            Facade facade = new Facade(AppContext.GetContext(Context));
            string path = "";
            if (Session["OrganizationEditId"] != null)
            {
                if (IsPostBack == false)
                {
                    var org = facade.GetOrganizationById(Convert.ToInt32("0" + Session["OrganizationEditId"]));
                    {
                        path = org.ItemDirectoryPath != null ? org.ItemDirectoryPath : "";
                    }


                   
                    FileExplorer1.Configuration.SearchPatterns = new string[] { "*.jpg", "*.jpeg", "*.gif", "*.png" };
                    FileExplorer1.Grid.ClientSettings.AllowColumnsReorder = false;
                    FileExplorer1.Grid.ClientSettings.AllowRowsDragDrop = false;
                    FileExplorer1.TreeView.OnClientNodeClicking = "OnClientNodeChange";
                    eExplorer1.EnableCreateNewFolder = enableCreateNewFolder.Checked;

                    if ((FileExplorer1.VisibleControls & Telerik.Web.UI.FileExplorer.FileExplorerControls.Grid) == 0) FileExplorer1.ExplorerMode = Telerik.Web.UI.FileExplorer.FileExplorerMode.Thumbnails;
                    if ((FileExplorer1.VisibleControls & Telerik.Web.UI.FileExplorer.FileExplorerControls.ListView) == 0) FileExplorer1.ExplorerMode = Telerik.Web.UI.FileExplorer.FileExplorerMode.Default;

                    
                    FileExplorer1.Configuration.ContentProviderTypeName = typeof(DBContentProvider).AssemblyQualifiedName;
                    if (path != "")
                    {
                        FileExplorer1.Configuration.UploadPaths = new string[] { path };
                        FileExplorer1.Configuration.ViewPaths = new string[] { path };
                        FileExplorer1.Configuration.DeletePaths = new string[] { path };

                        FileExplorer1.Configuration.EnableAsyncUpload = false;
                    }


                }
            }
            else
            {
                RedirectUrl("~/Widgets/SetupOptions/Organizations.ascx");

                Session.Remove("OrganizationEditId");
            }
        }

any one please help me 
thank you

1 Answer, 1 is accepted

Sort by
0
casa51
Top achievements
Rank 2
answered on 28 Jun 2018, 08:40 AM
the only solution I found is to use iframes
Tags
FileExplorer
Asked by
Mostafa
Top achievements
Rank 1
Answers by
casa51
Top achievements
Rank 2
Share this question
or