I have the following encoding in the database:
<p>
Content <span style="color: #ffffff"><span style="background-color: #ff0000">1+1+1+1=4</span></span>.</p>
I want to put this value into a HTML div tag.
Do I decode the above value before sending it back to clientside, or do I decode it at clientside?
I am using jquery and asp.net (vb)
This is my jquery, which just displays the json data as html on screen, instead of popping up in an alert box.
function get_page( id ) {
$.ajax({
url: 'get_json.aspx?rand=' + Math.random(),
type: 'POST',
data: { intPageID:id },
dataType: 'json',
success: function(results) {
alert(results);
/*
$('input#txtID').val(results.id);
$('input#txtHeading').val(results.heading);
$('textarea#taContent').val(results.content);
*/
}
});
This is a followup question to: Encode HTML before POST