Re: adding dropdown.SelectedItem.text to editor

  •  03-14-2007, 8:05 AM

    Re: adding dropdown.SelectedItem.text to editor

    I did realise that i needed a clientside event, im a bit new to javascript so please bear with me.
     
    I managed to get it working using the code below, i now need to insert a "#" at the begining and at the end of the inserted text.
    eg: If "Name" is selected from the dropdown i would like to insert "#Name#"
    Please advise to the best way of doing this.
     
    DropDownList dropdown = new DropDownList();
    container.Controls.Add(dropdown);
    dropdown.Attributes["Command"]="PasteHTML";
    dropdown.Attributes["onchange"]="CuteEditor_DropDownCommand(this,'"+ddl.Attributes["Command"]+"')";
     
    dropdown.CssClass = "CuteEditorDropDown";
    dropdown.DataValueField = "Desc";
    dropdown.DataTextField = "Desc";
    dropdown.DataSource = myDT;
    dropdown.DataBind();

    Thanks
    DJV
View Complete Thread