How can one place DataBinding inline code inside of inline c# code?
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")
...
精彩评论