I have a control that look something like this:
<asp:DetailsView ID="dvUsers" runat="server" DataSourceID="odsData"
DataKeyNames="Id">
...
</asp:DetailsView>
Which in the end will create a <table>
as the outer-most element. In my CSS I have:
table tr {
border-top: 0 ;
border-left: 0 ;
border-right: 0 ;
border-bottom-width: 1px;
}
Now when I run the web-site the rendered <table>
will have borders and styles which is due to the default settings for the control, which looks like this
<table cellspacing="0" rules="all" border="1" id="ctl00_body_dvUsers"
style="border-collapse:collapse;">
This will obviously override my CSS since it is inline and I do not want this. Is there any way of turning of all of the styling that is automatically done? I guess that I could recieve the same result as my CSS by setting a lot of attributes on the DetailsView
,
but I might have a lot of controls which in the end would render the final output as a table
and I would have to configure all of these the same way.
This would result in a lot of duplicate code and a lot of work if some designer want to change the style of all the tables, since I would have to go back and change the styles for every control in my Theme file.
So: Is there a way of saying "Don´t mess with the styles, I know what I am doing!"