в моем .aspx. Я хочу добавить оператор If на основе значение, исходящее из привязки. Я пробовал следующее:
<% if(bool.Parse(Eval("IsLinkable") as string)){ %>
monkeys!!!!!!
(please be aware there will be no monkeys,
this is only for humour purposes)
<%} %>
IsLinkable - это логическое значение, полученное от Binder. Я получаю следующую ошибку:
InvalidOperationException
Databinding methods such as Eval(), XPath(), and Bind() can only
be used in the context of a databound control.