I created a DataTable and I am adding new rows with new
object[].
DataTable dt = new DataTable();
dt.Rows.Add(new object[] { "Hello", "World",
"<i>Test</i>" });
In the object[] array I got some values that are
shown in the DataTable.
I would like to add some HTML styling, is this
possible like above? I would like to have the Testshown as italic.
Thanks in advance.
Anonymous User
18-Jan-2015The DataTable stores data, it it not responsible for any format or styling. So it depends on where you want to diplay it, if it's an ASP.NET-GridView you could use the RowDataBound event. HttpUtility.HtmlDecode should work to prevent that your html will be encoded: