Using '<%# Eval(“item”) %>'; Handling Null Value and showing 0 against

前端 未结 11 1727
清酒与你
清酒与你 2020-12-04 12:14

If dataitem is Null I want to show 0

\' runat=\"server\">         


        
11条回答
  •  日久生厌
    2020-12-04 12:39

    I don't know ASP.NET very well, but can you use the ternary operator?

    http://en.wikipedia.org/wiki/Ternary_operation

    Something like: (x=Eval("item")) == Null ? 0 : x

提交回复
热议问题