Custom Control Property returning "Encoded" text from textarea box

E

Earl Teigrob

I have a custom control that creates a textarea child control and diplays it
to the user. The control is defined as follows

System.Web.UI.HtmlControls.HtmlTextArea TextArea1;

I have a property called "Text" that sets and getis it value, as follows:

[Bindable(true),

Category("Appearance"),

DefaultValue("")]

public string Text

{


get

{

EnsureChildControls();

return TextArea1.Value;

}

set

{

EnsureChildControls();

TextArea1.Value = value;

}

}

The problem is that when I gete the contents of the textarea bos from the
"Text" property, if the text contains html tags, they are changed into their
html equivelents (< becomes &lt etc)

Why is this happening ahd how can I stop it???

Thanks

Earl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top