hello,
I am not getting how to do this, let me explain, I have data base having column name SignalCSS having some row (css class name) like PT1, PT2 . . . ,
now, in my model class I have property say public string SignalCSS{get;set} in this property I am getting class name, and I have .css file in that I define my class ex.
.PT1{ background : red}
.PT2{background : green}
now, in my view i have foeach loop, where i am creating div
foreach
{
<div class=" ? "></>
}
if my property value is PT1 then I want div with red background
if it is PT2 then it shoud be green.
So how can I achieve this, I am doing my first project in mvc, please help me to get out
thanks
tink