Dot Net Sample Codings
Friday, November 1, 2013
How to use Ternary Operator in MVC2/MVC3 Style & Class
MVC 3
<
div
id
="
divExchangeRateShow
"
style
="
display:
@(
Model.TransactionProcess.BeneficiaryCurrencyCode.ToUpper() !=
"USD"
?
"block"
:
"none"
)
"
>
MVC 2
<
div
class
="ft-dvm-form-block"
style
="
display
: <%=Model.TransactionProcess.BeneficiaryCurrencyCode.ToUpper() != "USD" ? "block" : "none"%>">
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment