c# 2.0 - Apply Html style in grid cell content -
i want format c# code in grid cell. want apply italic style string strprojectdelivery. not happening.
the below csharp string.
strprojectresults = strprojectgoals + "" + strprojectdelivery i used server.htmlencode().
strprojectresults = strprojectgoals + server.htmlencode("<i>"+ strprojectdelivery+"</i>"); and string result this,
highprioritygoals<i>deliveredontime</i> even htmldecode not working. please let me know how handle this.
thanks in advance.
the purpose of html encoding take arbitrary text , escape html tags it's treated plain text.
html-escaping <i> defeats purpose.
instead, need html-escape content you're building html
you need know whether each variable treated html or text, or you'll end having xss holes.
Comments
Post a Comment