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 -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -