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

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -