I found that you have this div inside another div that is not runat="Server". So make the parent also runat="server" and try.
<div runat="server" style="margin-top:2%; width: 100%; background: #FFBF02;">
<div id="blocks" runat="server"></div>
</div>
Hope it helps :)