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

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -