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.
为什么显示以下代码
">文字
<asp:Label ID="idlabel" runat="server" style='display:<% Eval(mystring.ToLower().Contains("search")) ? "none;" : "block;" %>' ClientIDMode="Static">Text</asp:label>
尝试这个:
<asp:Label ID="idlabel" runat="server" style='<%# "display: " + Eval(mystring.ToLower().Contains("search") ? "none;" : "block;" ) %>' ClientIDMode="Static">Text</asp:Label>