How can I achieve the desired effect? Here's the code:
<% if(!String.IsNullOrEmpty(%><%#Eval(Container.DataItem,"OrderXml");%><%)){ %>
etc., which is placed inside of an ItemTemplate
inside 开发者_JS百科of a TemplateColumn
. In the CodeBehind page I will bind a value to the OrderXml field, which occasionally is NULL
.
Unfortunately I get compilation errors.
Just remove the brackets before Eval:
<%# if(!String.IsNullOrEmpty(Eval(Container.DataItem,"OrderXml")
...
精彩评论