css - adding styles directly to elements in MVC without adding class -
i creating actionlink in mvc
@html.actionlink(item.someid, "somedetails", "somecase", new { userid = item.userid }, null)
now want add color based on variable have calculated
for example if creating td adding color
<tr style="color:@currentcolor">
is there way add color attribute actionlink have created? without adding @class="someclassname"
you can ,
@html.actionlink(item.someid, "somedetails", "somecase", new { userid = item.userid }, new { @style="color:"+currentcolor })
Comments
Post a Comment