Text property does not work

Last post 03-18-2011, 8:30 AM by Eric. 5 replies.
Sort Posts: Previous Next
  •  02-01-2007, 12:54 PM 26351

    Text property does not work

       Hello
     
    I've been tring to use CuteEditor.Net 5.3 in my app
    I added a button in toolbox and every time thta button is clicked the form is submited
    my problem relies here... It seems never to update cuteEditor.Text property no matter what i've typed
     
    this a piece of my code (VB.Net):
     
    PageLoad:
     
       if page.isPostBack then
          str = cuteEditor.Text
     
       else
          cuteEditor.Text='TESTING...'
       end if
     
    in the first postback i allways get the original content no matter what's inside the editor in my web page...
     
    my text property ins't working... it down't update the content!
     
    even when i go back to my page from the postback all content reverted to what was initially set... it does not keep the cuteEditor content
     
    can you help me here?
     
    regards
     
    Jorge Ribeiro
     
     
  •  02-01-2007, 1:59 PM 26353 in reply to 26351

    Re: Text property does not work

    Jorege,
     
    Please create a simple aspx which can demontrate the problem and send this file to me. Or reference the following example http://cutesoft.net/example/general.aspx to debug your project.
     
     

    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

  •  02-02-2007, 6:38 AM 26367 in reply to 26353

    Re: Text property does not work

    Hello

     

    I managed to overcome the problem... i was putting my cuteEditor outside the form tag
     
    now it works...
     
    however i do have another question... i made a new toolbar button that is suppose to send the html to a database
    but i can't define commandName to trap it on postback
    here's my code:
     
    ctrl = CuteEditor.CreateCommandButton("Send", "send.gif", "Send Message")
    ctrl.Attributes("onclick") = "CuteEditor_GetEditor(this).ExecCommand('PostBack')"
    int_pos = CuteEditor.ToolControls.IndexOf("Print")
    CuteEditor.InsertToolControl(int_pos, "Send", ctrl)
     
    the button works well but in my cuteEditor_PostBackCommand I cannot accessed commandName... it always comes "undefined"
     
    how can i make commandName="Send"??
     
    (great product so far)
     
    regards
     
     
    Jorge
  •  02-02-2007, 8:11 AM 26372 in reply to 26367

    Re: Text property does not work

    Jorge,
     
    Please check this example:
     
    create/register a custom button (Server Control) to Cute Editor

    How to create/register a custom button (Server Control) so that it can be used in the template?( C# | VB )

    This example demonstrates how easy it can be to add Server Controls to the CuteEditor and register it into Cute Editor toolbar.


    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

  •  03-18-2011, 7:29 AM 66736 in reply to 26372

    Re: Text property does not work

    hey i have like  this problem
    cute editor good work in my computer
    but on host  not return value (text property =="")
     how ti i?
    its essential, thanks
     
  •  03-18-2011, 8:30 AM 66741 in reply to 66736

    Re: Text property does not work

    Dear yeganehaym,
     
    Please save the following snippet to test.aspx and then upload it to your host, does it happen in this example?
    <%@ Page Language="C#"%>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
        <head>
      <title>ASP and ASP.NET WYSIWYG Editor - Edit Static Html Example </title> 
     </head>
     <body>
            <form id="Form1" runat="server">   
            <CE:Editor id="Editor1" runat="server" ></CE:Editor><BR>
            <asp:Button id="btnUpdate" onclick="Submit" Runat="server" Text="Submit"></asp:Button><br />   
         <asp:textbox id="textbox1" runat="server" TextMode="MultiLine" Height="250px" Width="750px" Font-Name="Arial"></asp:TextBox> 
      </form>
     </body>
    </html>
    <script runat="server">
     void Page_Load(object sender, System.EventArgs e)
     {      
     }
     public void Submit(object sender, System.EventArgs e)
     {   
      textbox1.Text = Editor1.Text; 
     }
    </script>
    Thank you for asking
View as RSS news feed in XML