HowTo: Get ceToolbar Custom Object Values

Last post 11-26-2004, 2:47 PM by cutechat. 3 replies.
Sort Posts: Previous Next
  •  11-25-2004, 5:02 PM 2595

    HowTo: Get ceToolbar Custom Object Values

    Hi. I´ve inserted a TextBox in the CE Toolbar in order to create a MailForm. [ I want the msg field and the tbxEmail fields in one single object, eg: CuteEditor ] according to the following pic:
     
     
    Now when I press the Save btn I need to get the value in the tbxEmail field, but how?
     
    I´m trying:
     
    private void ce1_PostBackCommand(object sender, System.Web.UI.WebControls.CommandEventArgs e)

            if( string.Compare(e.CommandName,"Save",true)==0 ) 
            { 
                    / / Check tbxEmail??? 
                    // this.ce1.ToolControls.IndexOf("tbxEmail"); 
                    ??? 
            }
     }
    Any tips?

    Regards,
    »»» KenA
  •  11-26-2004, 11:19 AM 2602 in reply to 2595

    Re: HowTo: Get ceToolbar Custom Object Values

    KenA :
        I just write a sample for you :
        aspx:
       
        aspx.cs:
       

    If you have any questions about this sample , please reply this thread .

    Regards , Terry .
  •  11-26-2004, 1:42 PM 2608 in reply to 2602

    Re: HowTo: Get ceToolbar Custom Object Values

    Thanks Terry,

    Actually being able to insert a 'Holder' as a atributte of CE tag makes things easy. Before that I was doing something like:


    And in the ce1_PostBackCommand


    Regards,
    »»» KenA
  •  11-26-2004, 2:47 PM 2614 in reply to 2608

    Re: HowTo: Get ceToolbar Custom Object Values

    Yes .

    What you need to do , is put this
    "System.Web.UI.WebControls.TextBox tbxEmail"
    as the class member .
    and change the statement to
    "this.tbxEmail = new System.Web.UI.WebControls.TextBox();"

    for the
    "while( i<this.ce1.ToolControls.Count ){ ...  }"
    you could use the

    TextBox tb=(TextBox)=this.ce1.ToolControls["tbxEmail"].Control;

    instead .

    if you have change the tbxEmail  to the class member ,

    " this.tbxEmail " would be the best way .

    Regards , Terry .
View as RSS news feed in XML