Link to home
Start Free TrialLog in
Avatar of doramail05
doramail05Flag for Malaysia

asked on

append text in editor controls asp.net

trying to append text in editor control which comes with

edit01.Value.

Value has following properties as (Aggregate, All, Any, Insert, Join...etc)

but trying to find the properties call 'Append', which allows edit01.Value to append text after apple with word banana

eg.
apple banana (appended)

was trying to use += , but the editor will add after the following line
eg.
apple

banana
Avatar of fourck
fourck

hi,

its better that you concatenate all your string first, and when done simply assign it to the textBox (edit01.value = yourFinalString) instead.


if after doing that, problem persist, you should tell me where does 'banana' comes from (input fiesl, variable, ....)

Good Luck!
ASKER CERTIFIED SOLUTION
Avatar of Rajar Ahmed
Rajar Ahmed
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

in the meeran03 solution, he added a "\n", which doramail05 is trying to prevent.
so the solution should be like that:

using System.Text;

public partial class cs_txtApeend : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        StringBuilder strbilder = new StringBuilder();
        strbilder.Append("apple");
        strbilder.Append("banana");
        edit01.value = strbilder.ToString();
    }
}
                                            

Open in new window


Good Luck!