Re: Creating directories

  •  09-09-2005, 3:15 PM

    Re: Creating directories

    This is an example:
     
    <%@ Page Language="vb"%> <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %> <html> <head> <title>Personalization and Programmatic Security Example</title> </head> <body> <form runat="server"> <asp:radiobuttonlist style="BORDER:#c0c0c0 1px solid;" BgColor="#f5f5f5" id="RadioList" runat="server" autopostback="True" RepeatLayout="Table" RepeatColumns="3" CellPadding="0" CellSpacing="0" RepeatDirection="Horizontal" onselectedindexchanged="security_Changed"> <asp:ListItem value="Administrators"> <span style="width:100">Administrators</span></asp:ListItem> <asp:ListItem value="Members"> <span style="width:100">Members</span></asp:ListItem> <asp:ListItem value="Guest"> <span style="width:100">Guest</span></asp:ListItem> <asp:ListItem value="John"> <span style="width:100">John (admin)</span></asp:ListItem> <asp:ListItem value="Mary"> <span style="width:100">Mary (sales)</span></asp:ListItem> <asp:ListItem value="Tim"> <span style="width:100">Tim (financial)</span></asp:ListItem> </asp:radiobuttonlist> <br /> <CE:Editor id="Editor1" EditorWysiwygModeCss="../example.css" runat="server" AutoConfigure="Simple"></CE:Editor> </form> </body> </html> <script runat="server"> Public Sub Page_Load(sender As object, e As System.EventArgs) If Not Page.IsPostBack Then Editor1.SecurityPolicyFile = "default.config" SetUploadsFolder("~/Uploads/Member/") Editor1.ReadOnly = false End If End Sub public Sub security_Changed(sender As object, e As System.EventArgs) Dim temp As String = "" Select Case RadioList.SelectedItem.Value case "Administrators": Editor1.SecurityPolicyFile = "Admin.config" SetUploadsFolder("~/Uploads/") case "Members": Editor1.SecurityPolicyFile = "default.config" SetUploadsFolder("~/Uploads/Member/") case "Guest": Editor1.SecurityPolicyFile = "Guest.config" SetUploadsFolder("~/Uploads/Guest/") 'case "Banned": ' Editor1.ReadOnly = true case "John": Editor1.SecurityPolicyFile = "Admin.config" SetUploadsFolder("~/Uploads/Users/John/") case "Mary": Editor1.SecurityPolicyFile = "default.config" SetUploadsFolder("~/Uploads/Users/Mary/") case "Tim": Editor1.SecurityPolicyFile = "default.config" SetUploadsFolder("~/Uploads/Users/Tim/") End Select End Sub Sub SetUploadsFolder(ByVal folder As String) Dim phyfolder As String = Server.MapPath(folder) 'see security.config Editor1.Setting("security:ImageGalleryPath")=folder Editor1.Setting("security:MediaGalleryPath")=folder Editor1.Setting("security:FlashGalleryPath")=folder Editor1.Setting("security:FilesGallaryPath")=folder End Sub </script>

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View Complete Thread