在我的母版页中,我有用户链接,授权也不同,如管理员和普通用户。
彼此下的链接,我可以根据授权状态隐藏超链接,但问题是,当我有 3 个链接时,管理员的第二个链接将在用户正常且链接位置为空时隐藏,如 123 1 3.
所以我有一个想法,在一个 tr 中使用表中的每个链接,但我无法隐藏 td 或 tr,因为 Visible 不在属性中。
有什么帮助吗? 谢谢
最佳答案
根据how to hide a having asp.net control :
you can give ID either to the TD or TR to which you want to hide/show with the runat="server" and also you can take that tr/td inside the div tag and give id to that div tag and also runat=server attribute and after that you can pro grammatically hide/show that div.
like
<pre> <tr id="trhide" runat="server"> </tr> </pre>
in code behind write
trhide.visible=true/false
关于asp.net - 在代码隐藏中使用 vb.net 在表中隐藏 tr 或 td,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21214351/