Since DIV is a simple html control, you need to make it server control. Then you can access all the properties of it.
You need to do the following:
HTML:
<div id="dvTest" runat="server" class="something">
//some code
</div>
Code behind:
string style = dv.Attributes["class"].ToString();
--Amit