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

RadFileExplorer upload option is not working

0 Answers 21 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
sudha
Top achievements
Rank 1
sudha asked on 05 Aug 2015, 06:20 AM

Hi team,

I try to integrate RadFileExplorer control in one page. In my project developed by MVP format.

File explorer control is working delete,new folder creation, rename etc., File selected using upload control after click upload button but file is not uploaded.

Its not displayed any error.

I entered code also. kindly provide the solution for this problem. I am waiting for your reply

 

List page Code:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListControl.ascx.cs" Inherits="App.Presentation.CMS.Photobooth.Defaults.DomainControl.ListControl" %>
<%@ Register Assembly="Microsoft.Practices.Web.UI.WebControls" Namespace="Microsoft.Practices.Web.UI.WebControls" TagPrefix="pp" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<h1>Default</h1>
  <script>
      (function (global, undefined) {
          function OnClientItemSelected(sender, args) {
              var pvwImage = $telerik.$("#pvwImage").get(0);
              var imageSrc = args.get_item().get_url();

              if (imageSrc.match(/\.(gif|jpg)$/gi)) {
                  pvwImage.src = imageSrc;
                  pvwImage.style.display = "inline-block";
              }
              else {
                  pvwImage.style.display = "none";
              }
          }

          global.OnClientItemSelected = OnClientItemSelected;
      })(window);
  </script>
 
<table style="width: 100%">
    <tr>
        <td style="width: 100%">
            <telerik:RadFileExplorer runat="server" ID="RadFileExplorer1" Width="595px" Height="350px" EnableOpenFile="true" AvailableFileListControls="All"
                EnableAsyncUpload="true" EnableCreateNewFolder="true" AllowPaging="true" PageSize="10" OnClientItemSelected="OnClientItemSelected" >
                <Configuration EnableAsyncUpload="true" ViewPaths="~/Resources/Images" MaxUploadFileSize="1048576" AllowMultipleSelection="false"
                    UploadPaths="~/Resources/Images" DeletePaths="~/Resources/Images"></Configuration>                
            </telerik:RadFileExplorer>
        </td>
    </tr>
</table>​

 

 

Master page code:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="​App_CMS.master.cs" Inherits="App.Presentation.CMS.​App_CMS" %>​

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="CMSMenu.ascx" TagName="Menu" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>HDB Content Management System</title>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script src='<%= ResolveUrl("~/Scripts/jquery-1.7.1.min.js") %>' type="text/javascript"></script>
        <script src='<%= ResolveUrl("~/Scripts/jquery-ui-1.8.17.custom.min.js") %>' type="text/javascript"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                $('#dvLogo').click(function () {
                    document.location.href = "/Home.aspx"
                });
            });
        </script>
    </telerik:RadCodeBlock>
    <link rel="SHORTCUT ICON" href="/Images/logo.ico" />
    <link href="~/Styles/CMSStyleSheet.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body id="bodyContent">
    <form id="form1" runat="server">
        <script type="text/javascript">
            if (typeof (Telerik) != "undefined" && typeof (Telerik.Web.UI.RadInputControl) != "undefined") {
                Telerik.Web.UI.RadInputControl.prototype.updateCssClass_Old = Telerik.Web.UI.RadInputControl.prototype.updateCssClass;
                Telerik.Web.UI.RadInputControl.prototype.updateCssClass = function () {
                    //                this._hovered = false;
                    //                this._focused = false;
                    //                //this._focus = false;
                    //                this.updateCssClass_Old();
                }
            }
        </script>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true"></telerik:RadScriptManager>
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="False" Skin="Sunset"></telerik:RadSkinManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelsRenderMode="Inline" />
        <div id="divMainContainer">
            <div id="divHeader">
                <div id="leftcolumn"><img src="/Resources/Images/Logo_HDB.png" /></div>
                <div id="rightcolumn"><img src="/Resources/Images/Logo_MNH.png" /></div>
                <div class="clear"></div>
            </div>
            <div id="divMenu" style="width: 100%;">                
                <uc1:Menu ID="Menu1" runat="server" />   
            </div>
            <div id="divContent">
                <div style="margin-top:10px;margin-left:10px;margin-right:12px;">
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                        
                    </asp:ContentPlaceHolder>
                </div>
            </div>
            <div id="divFooter">
            </div>
        </div>
    </form>
</body>
</html>​

 

 

 

No answers yet. Maybe you can help?

Tags
FileExplorer
Asked by
sudha
Top achievements
Rank 1
Share this question
or