Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
リピーターコントロールを使用しています。私のアイテム属性の1つはブール値です。Textプロパティで次のような条件文を実行できることはわかっています。
Text='<%# Item.Boolean ? "Text 1" : "Text 2" %>
ただし、ブール値に応じて同じテキストで異なるCSSスタイルが必要な場合はどうなりますか?
次のようなコードは可能ですか?
CssClass=<%# Item.Boolean ? "CssClass1" : "CssClass2" %>