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.
我可以在 C# 中使用其他选项吗?我有一个条件需要满足才能显示这些传奇之一。截至目前,我不知道如何将这个图例设置为从 .cs 端不可见......除非还有一些 .asp 等价物???有什么建议么?谢谢!
您可以runat="server"在其上使用该属性并为其提供一个 ID:
runat="server"
<fieldset> <legend runat="server" id="leg">Some Legend</legend> Some value </fieldset>
然后在后面的代码中使用 id 来隐藏它:
protected void Page_Load(object sender, EventArgs e) { leg.Visible = false; }