Re: How to create CuteEditor Dynamically in VB

  •  06-16-2006, 6:59 AM

    Re: How to create CuteEditor Dynamically in VB

    I have simplified the code to the point where its only giving the error
     
    "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)."

     
    Please take a look and let me know if there is a better way of accomplishing the same result. I want to add a new CuteEditor at a certain place on my page dynamically.
     
    <%  '**************************************************************************************** %>
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
    <%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
    <div>
        Before The Editor
    </div>
    <div>
    <%
        Dim Editor As New CuteEditor.Editor
        Editor.ID = "txtEditor"
        Editor.FilesPath = "../CuteSoft_Client/CuteEditor"
        Me.Controls.Add(Editor)
    %>
    </div>
    <div>
        After the Editor
    </div>
    </body>
    </html>
    <%  '**************************************************************************************** %>
     
     
    Thanks
     
    Aon
     
View Complete Thread