Re: CuteEditor value need in aspx.cs page - When the editor in Readonly mode

  •  01-13-2012, 10:03 AM

    Re: CuteEditor value need in aspx.cs page - When the editor in Readonly mode

    Hi rajmohanp,
     
    Please try the example below
     
    <%@ Page Language="C#" %>
    <%@ 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">
    <script runat="server">
        protected override void OnLoad(EventArgs e)
        {
            if (!IsPostBack)
            {
                Editor1.Text = "this is a test";
            }
            base.OnLoad(e);
        }
        protected void btn_GetContent_Click(object sender, EventArgs e)
        {
            label1.Text = Editor1.Text;
        }
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    </head>
    <body>
        <form id="form1" runat="server">
            <CE:Editor ID="Editor1" runat="server" ReadOnly="true">
            </CE:Editor>
            <asp:Button ID="btn_GetContent" runat="server" Text="Get Editor Content" OnClick="btn_GetContent_Click" /><br />
            <asp:Label ID="label1" runat="server"></asp:Label>
        </form>
    </body>
    </html>
     
    Regards,
     
    Ken 
View Complete Thread