Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

asp.net GridView spitting out invalid HTML

I was wondering if there was a way to remove the invalid HTML code that the GridView is spitting out once it's created?

<table cellspacing="0" rules="all"

I'd like to remove the cellspacing and rules attribute.

Thank you!

like image 238
Karinne Avatar asked Jan 14 '23 06:01

Karinne


1 Answers

Just found that putting

<asp:GridView CellSpacing="-1"

removes the unwanted and deprecated cellspacing attribute.

like image 121
Karinne Avatar answered Jan 20 '23 16:01

Karinne