Re: set the upload folder to the current month

  •  05-04-2009, 8:51 AM

    Re: set the upload folder to the current month

    Hi acecuteeditor,
     
    Try this way
     
    ---------------------------------------------->
     

    <%@ Page Language="C#" AutoEventWireup="True" %>

    <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>
    <!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">

    <script runat="server">
     
     
        protected override void OnLoad(EventArgs e)
        {
            Editor1.Setting["security:FilesGalleryPath"] = "~/Uploads/" + DateTime.Now.Month.ToString();
            base.OnLoad(e);
        }
    </script>

    <head id="Head1" runat="server">
        <title>test</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <CE:Editor ID="Editor1" runat="server">
            </CE:Editor>
        </form>
    </body>
    </html>
    ---------------------------------------------->
     
    Regards,
     
    Ken
View Complete Thread