Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asp.Net GridView Remove Html Styling

When I'm using a grid view in Asp.Net, its auto-generated this ugly Html style : cellspacing="0" rules="all" border="1" style="border-collapse:collapse;

Is there a way to not have this styling at all ?

UPDATE

Presently what I got is :

<table cellspacing="0" rules="all" border="1" id="ctl00_cphMain_gvTest" style="border-collapse:collapse;">

What I want :

<table id="ctl00_cphMain_gvTest">

So, no Html style at all. I want clean Html, I'll use CSS if I want to add style...

like image 990
Melursus Avatar asked Aug 21 '09 01:08

Melursus


1 Answers

Take a look at the CSS friendly ASP.NET 2.0 Control Adapaters on the ASP.NET website.

It not only strips out most of the ugly attributes but also adds thead and tbody tags.

like image 115
Chris Van Opstal Avatar answered Sep 30 '22 15:09

Chris Van Opstal