HTML JavaScript Encoder and C# Decoder -
i implement html encoder in javascript this. , implement corresponding decoder this.
any encoder/decoder work. examples.
my ultimate goal transfer html markup via hiddenfield , utilize transferred html on destination. without encoding/decoding, page breaks. that's why encode in javascript , decode in c#.
javascript encoder:
function htmlencode(value) { //create in-memory div, set inner text (which jquery automatically encodes) //then grab encoded contents out. div never exists on page. homecoming $('<div/>').text(value).html(); }
c# decoder:
public string htmldecode(value) { homecoming httputility.htmldecode(value); }
javascript c# html asp.net encoding
No comments:
Post a Comment