More in this section
Forums / General Discussions / FileUploadedEvent not found

FileUploadedEvent not found

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Venkateswarlu
    Venkateswarlu avatar
    2 posts
    05 Jun 2013
    07 Feb 2014
    Link to this post
    Hi sir,
    Please suggest me the below issues,
    type or namespace name 'FileUploadedEventArgs' could not be found (are
    you missing a using directive or an assembly reference?)

    (2).ImageEditorLoadingEventArgs args)

    Here is my code:


    <%@ Page Title="" Language="C#" MasterPageFile="~/SameMaster.master" AutoEventWireup="true"
        CodeFile="ImageEditorSample.aspx.cs" Inherits="ImageEditorSample" %>

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
        <telerik:RadCodeBlock ID="RCB" runat="server">
            <style type="text/css">
                ._Telerik_IE9 .RadDock.rieDialogs
                    z-index: 20001;
                ._Telerik_IE9 .rcbSlide
                    z-index: 20002 !important;
                    height: 85px;
                    background-image: url("../../images/upload_100.png");
                    background-position: left;
                    background-repeat: no-repeat;
                    padding: 15px 0 0 100px;
                div.RadUpload .ruBrowse
                    background-position: 0 -46px;
                    width: 115px !important;
                div.RadUpload_Default .ruFileWrap .ruButtonHover
                    background-position: 100% -46px !important;
        <telerik:RadScriptBlock runat="server">
            <script type="text/javascript">
                function OnClientFilesUploaded(sender, args) {
                    $find('<%=RadAjaxManager1.ClientID %>').ajaxRequest();

        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnablePageHeadUpdate="false">
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                        <telerik:AjaxUpdatedControl ControlID="RadImageEditor1" />

         <div id="dwndWrapper">
            <telerik:RadAsyncUpload ID="AsyncUpload1" runat="server"
                OnClientFilesUploaded="OnClientFilesUploaded" OnFileUploaded="fileUploaded"
                MaxFileSize="2097152" AllowedFileExtensions="jpg,png,gif,bmp"
                AutoAddFileInputs="false" Localization-Select="Upload Image" />
            <asp:Label ID="Label1" Text="*Size limit: 2MB" runat="server" Style="font-size: 10px;"></asp:Label>

        <telerik:RadImageEditor ID="RadImageEditor1" runat="server" Width="680" Height="450"
            ImageUrl="~/js/Image-Editing.jpg" OnImageLoading="RadImageEditor1_ImageLoading">

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.IO;    
    using Telerik.Web.UI.ImageEditor;
    using System.Web.SessionState;

    public partial class ImageEditorSample : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)


        protected void fileUploaded(object sender, FileUploadedEventArgs e)
            //Clear changes and remove uploaded image from Cache  FileUploadedEventArgs e)
            Context.Cache.Remove(Session.SessionID + "UploadedFile");
            using (Stream stream = e.File.InputStream)
                byte[] imgData = new byte[stream.Length];
                stream.Read(imgData, 0, imgData.Length);
                MemoryStream ms = new MemoryStream();
                ms.Write(imgData, 0, imgData.Length);

                Context.Cache.Insert(Session.SessionID + "UploadedFile", ms, null, DateTime.Now.AddMinutes(20), TimeSpan.Zero);

        protected void RadImageEditor1_ImageLoading(object sender, ImageEditorLoadingEventArgs args)
            //Handle Uploaded images   ImageEditorLoadingEventArgs args)
            if (!Object.Equals(Context.Cache.Get(Session.SessionID + "UploadedFile"), null))
                using (EditableImage image = new EditableImage((MemoryStream)Context.Cache.Get(Session.SessionID + "UploadedFile")))
                    args.Image = image.Clone();
                    args.Cancel = true;

  2. Nayden Gochev
    Nayden Gochev avatar
    32 posts
    03 Nov 2014
    10 Feb 2014
    Link to this post

    The FileUploadedEventArgs class is defined in Telerik.Web.UI Assembly.

    Nayden Gochev
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
2 posts, 0 answered