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

Last post 01-20-2012, 5:27 AM by rajmohanp. 6 replies.
Sort Posts: Previous Next
  •  01-12-2012, 4:39 PM 72662

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

    Hi Sir,
     
    How to get the cute editor values(what we entered) in aspx.cs page, if the editor is readonly mode.
     
    I have tried to take the values using the code: string sVal = Editor1.value; If the editor is readonly mode It returns ONLY empty. But It returns values ONLY when remove the readonly mode. 
    Can u pls help me how to get  the values(what we entered into the Editor) in aspx.cs page.
     
    Thanks, 
    P. Rajmohan
     
  •  01-13-2012, 6:13 AM 72666 in reply to 72662

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

    Hi rajmohanp,
     
    Please use property "Text", editor1.Text.
     
    Regards,
     
    Ken 
  •  01-13-2012, 8:20 AM 72678 in reply to 72666

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

    Thanks for replay ken..
     
    It is also NOT working. Can u pls give any other option.
     
    Thanks,
    P. Rajmohan
  •  01-13-2012, 10:03 AM 72680 in reply to 72678

    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 
  •  01-13-2012, 10:43 AM 72686 in reply to 72680

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

    Thanks for the code ken...
     
    Still am not getting the values.
     
    Actually i have done the readonly part in .cs page, like "Editor1.ReadOnly = true;"
     
    So  i think the values are empty when get it.
     
    protected void btn_GetContent_Click(object sender, EventArgs e)
        {
            label1.Text = Editor1.Text;
        }
     
     
    Any other solution pls.
     
     
    Thanks,
    P. Rajmohan
  •  01-13-2012, 10:57 AM 72687 in reply to 72686

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

    Hi rajmohanp,
     
    Is your site online? If so, can you set up ftp access for me? So I can check it for you directly.
     
     
    Regards,
     
    Ken 
  •  01-20-2012, 5:27 AM 72755 in reply to 72687

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

    HI Ken,
     
    Sorry... some security reasons NOT able to provide ftp access.
     
    Anyway Thanks Ken for the reply.
     
    Thanks,
    P. Rajmohan
View as RSS news feed in XML