开发者

How can one place DataBinding inline code inside of inline c# code?

开发者 https://www.devze.com 2023-01-09 02:22 出处:网络
How can I achieve the desired effect? Here\'s the code: <% if(!String.IsNullOrEmpty(%><%#Eval(Container.DataItem,\"OrderXml\");%><%)){ %>

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

精彩评论

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