asp.net mvc - Good approach for conditionally setting CSS class mvc -



asp.net mvc - Good approach for conditionally setting CSS class mvc -

i know can utilize htmlhelpers access info repository , homecoming appropriate class.

<a class="<%= html.getonoffstate(); %>"...

but other approaches there?

write entire actionlink helper instead of next tag soup:

<a class="<%= html.getonoffstate(); %>"..

you use:

<%= html.toggableactionlink("foo", "bar") %>

asp.net-mvc asp.net-mvc-3

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -