Apply color to the control from database value

by 8:46 PM 0 comments

Hello friends some times we need to apply the styles to the controls from database fields...so here is the tips to apply the styles to the controls...!


<asp:Label ID="Label2" runat="server" Text="Label" 
     BackColor='<%#  System.Drawing.ColorTranslator.FromHtml(Eval("Color").ToString())%>'
</asp:Label>


enjoy..!

ravi tuwar

Developer

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.

0 comments:

Post a Comment