Problem With editor in MasterPages & User web Control

  1. #1

    Problem With editor in MasterPages & User web Control

    hi . i download the community edition of Coolite Dll & test it .
    when i use some toolkit With master page OR WebUserControl it did'nt Work !

    i use html editor in master page & in Web User Control and it did'nt Work! :(

    is it incompatible Or i have Problem?

    Sample Code With Web User Control :

    aspx Page :
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Editor32.aspx.cs" Inherits="Coolite_Test2.Editor32" %>

    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>

    <%@ Register src="edit1.ascx" tagname="edit1" 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>Untitled Page</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <hr />

    <uc1:edit1 ID="edit11" runat="server" />

    <br />
    </div>
    </form>
    </body>
    </html>

    and My User Control :
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="edit1.ascx.cs" Inherits="Coolite_Test2.edit1" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>

    <ext:ScriptManager ID="ScriptManager2" runat="server">
    </ext:ScriptManager>

    <div>
    <asp:TextBox ID="Txt" runat="server"></asp:TextBox>
    <ext:Editor ID="Editor12" runat="server" Target="Txt">
    <Field>
    <ext:HtmlEditor ID="HtmlEditor53" runat="server" Width="400px" EnableAlignments="true" AutoRender="true" />
    </Field>
    </ext:Editor>
    </div>

    ----------------------------------------------------------------------------------------------
    Or with masterPage :
    <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Default.master.cs" Inherits="Coolite_Test2.Default" %>

    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>

    <!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>Untitled Page</title>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
    </head>
    <body>
    <form id="form1" runat="server">
    <ext:ScriptManager ID="ScriptManager1" runat="server">
    </ext:ScriptManager>
    <div>
    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

    </asp:ContentPlaceHolder>
    </div>
    </form>
    </body>
    </html>


    My Page :
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Editor_MasterPage.aspx.cs" Inherits="Coolite_Test2.Editor_MasterPage" MasterPageFile="~/Default.Master" %>

    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>

    <asp:Content ID="h" runat="server" ContentPlaceHolderID="head">

    </asp:Content>

    <asp:Content ID="B" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <div>

    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <ext:Editor ID="Editor1" runat="server" Target="TextBox1">
    <Field>
    <ext:HtmlEditor ID="HtmlEditor3" runat="server" Width="400px" EnableAlignments="true" />
    </Field>
    </ext:Editor>
    </div>

    </asp:Content>
    Last edited by firebird_design; Sep 04, 2010 at 8:10 AM.
  2. #2
    Hi,

    Why do you use Editor with Target which pointed to the textbox?
    Also when you use user control or master page the ID doesn't equal ClientID
    Try to use #{} syntax
    <ext:Editor ID="Editor12" runat="server" Target="#{Txt}">
  3. #3
    Quote Originally Posted by vladimir View Post
    Hi,

    Why do you use Editor with Target which pointed to the textbox?
    Also when you use user control or master page the ID doesn't equal ClientID
    Try to use #{} syntax
    <ext:Editor ID="Editor12" runat="server" Target="#{Txt}">

    So Thanks :) :) :)

Similar Threads

  1. [CLOSED] Problem with Page.X() and masterpages
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 08, 2012, 7:32 PM
  2. Replies: 2
    Last Post: Feb 06, 2012, 9:06 AM
  3. Replies: 8
    Last Post: Jan 25, 2011, 4:21 AM
  4. Problem with store and user control
    By pierusch in forum 1.x Help
    Replies: 0
    Last Post: Jun 04, 2010, 10:14 PM

Tags for this Thread

Posting Permissions