css - asp.net cssclass vs assigning class to asp.net object directly -


i have lot of code reworking in single item wrapped in div block single linked cssstyle. there doesn't seem real difference between wrapping .net object in div , applying style "cssstyle" property. there real difference?

<div class="grid_1">       <asp:formview id="formview8" runat="server" datasourceid="odsinst">            <itemtemplate>                 <asp:linkbutton id="linkbutton1" runat="server" tooltip='<%# eval("testscorespagenrstudents")%>'>(?)</asp:linkbutton>            </itemtemplate>       </asp:formview> </div> 

vs

<asp:formview id="formview8" runat="server" datasourceid="odsinst" cssclass="grid_1">     <itemtemplate>         <asp:linkbutton id="linkbutton1" runat="server" tooltip='<%# eval("testscorespagenrstudents")%>'>(?)</asp:linkbutton>     </itemtemplate> </asp:formview> 

the difference in first case, render:

<div class="grid_1">     <table>...</table> </div> 

versus:

<table class="grid_1">...</table> 

this have impact on how able design css. thought first case (the <div>) preferable since gain more flexibility in designing css classes -- mainly, not restricted being solely within table. of course, if grid_1 class solely styling tabular data, second case fine.


Comments