This project has moved. For the latest updates, please go here.

HTML-CDATA in Description

Topics: Developer Forum, User Forum
Oct 22, 2007 at 12:28 AM
Anyone knows, how to put HTML/CDATA section in Description ?
Right now, all of the strings are escaped as < and >

Oct 26, 2007 at 11:55 AM
Edited Oct 26, 2007 at 12:50 PM
for a gridview you need to set HTMLEncode property to false.

In the Samplewebsite CodeGeneratedClass.aspx (as it autogenerates the columns) you can add

        protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow) {
               e.Row.Cells[2].Text = Server.HtmlDecode(e.Row.Cells[2].Text);
            }
        }
with OnRowDataBound="GridView1_RowDataBound" in the gridview tag
Oct 26, 2007 at 4:42 PM
DominicTurner,
thx for your reply. I was asking how to put HTML/CDATA section in ASP.NET RSS Toolkit's Ouput XML. and not in general ASP.NET Pages.