Posted on: 9/29/2012 3:53:24 AM | Views : 436

Hi,
I have a setup like this:
<asp:TextBox
ID="txtComments"
TextMode="MultiLine"
Columns="30"
Rows="13"
runat="server" TabIndex="4" />
<asp:HtmlEditorExtender
TargetControlID="txtComments"
runat="server">
<Toolbar>
<ajaxToolkit:Undo />
<ajaxToolkit:Redo />
<ajaxToolkit:Bold />
--------------
</Toolbar>
</asp:HtmlEditorExtender>
On Insertion i am encoding whatever is there in textbox like:
pPostMessage.Value = Server.HtmlEncode(txtComments.Text.Trim());
and after that inserting into database.
While showing this to user i am doing like this:
public string GetMSG(object PostMessage)
{
string msg = Server.HtmlDeco ...

Go to the complete details ...