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

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

If dataitem is Null I want to show 0

\' runat=\"server\">         


        
11条回答
  •  忘掉有多难
    2020-12-04 12:46

    I have tried this code and it works well for both null and empty situations :

    '<%# (Eval("item")=="" || Eval("item")==null) ? "0" : Eval("item")%>'
    

提交回复
热议问题