开发者

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") ...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜