0

I am populating a GridView from a dataset. In the RowDataBound event I check various variables and, for example, set the rowspan and colspan of various cells - add borders - make some cells bold etc.

I need to get the html generated for the gridview (table) into a stringbuilder expression. Any ideas how to do this. I have a div surrounding the table - but if I write:

StringBuilder sb = new StringBuilder();
sb.Append(dv.InnerHtml);

I am told 'Cannot get inner content of dvScroll because the contents are not literal'.

I just need to get the html for the table - as the form it is in when sent to the browser - into a string.

Martin Smellworse
  • 1,702
  • 3
  • 28
  • 46

0 Answers0