samedi 28 février 2015

HtmlEditorExtender data not displaying correctly on server

I have a asp.net c# web application, I have a form that has a textbox field that is using the HtmlEditorExtender. This is all working fine. I use the Server.HtmlEncode when saving the content of the textbox to the database, and i use Server.HtmlDecode when i want to display the contents of the textbox to the screen. That is to say, i am not displaying the data in the same textbox, but though the following code:


when i run the code through visual studio it will work ok, but when i run it from the server the problems occur. The problem is that my tags get messed up, and it's like the quotation marks and tags within the HtmlEditorExtender are being interperted in a way that is not done in visual studio


sample of the job_desc field, but you can see the quotation marks. The full text is way longer than this



<h2 style="margin-bottom:12.0pt;
mso-pagination:none;page-break-after:auto">
<span style="font-size:13.0pt;
font-family:&quot;
Arial&quot;
,&quot;
sans-serif&quot;">some title, some text&lt;o:p&gt;&lt;
/o:p&gt;
</span>
&lt;/h2&gt;&lt;h2 style="

Aucun commentaire:

Enregistrer un commentaire