Click here to Skip to main content
15,880,503 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

May be the topic name is not understandable, but I am explaining here what i want exactly.

I am storing the text from CK editor to database as below code in vb.net :-

strbody = CKEditor1.Text
temp.TempEbody = Server.HtmlEncode(strbody) 


it is storing as :

HTML
<p>
Testing Html encodingTesting Htm</p>
<p>
l encodingTesting Html encodingTesting</p>
<p>
Html encodingTesting Html encodingTesting H</p>
<p>
tml encodingTesting Html encodingTesting Html</p>
<p>
encodingTesting Html encodingTesting Ht</p>
<p>
ml encodingTesting Html encoding</p>


and when I am fetching the same text and want to send over the mail it is sending with the html tags.

Can anyone suggest the solution?

Thanks
Posted

Either you can fetch plain text from the editor or you can set
VB
IsBodyHtml = true

for your mail definition.
 
Share this answer
 
Solved my self

Dim strYourHTML As String
strYourHTML = "

your string

"
Dim strDecodedHTML As String
strDecodedHTML = Server.HtmlDecode(strYourHTML)


Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900