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.Net C# web 应用程序我有一个Button X, 在服务器端 C# (ButtonX.Visible = false;)按钮消失(很好),但在下一篇文章中,页面永远不会呈现。我调试一切正常,调试器返回控制,但页面永远不会呈现。如果我注释掉 (ButtonX.Visible = false;)所有工作正常,除了buttonX在浏览器中可见
Button X
(ButtonX.Visible = false;)
buttonX
那是怎么回事?任何帮助,将不胜感激。谢谢
如果你想在客户端隐藏按钮。不要ButtonX.Visible = false 像@southshoreAK 建议的那样制作,而是在 javascript 中隐藏或显示:-
ButtonX.Visible = false
document.getElementById('<%=ButtonX.ClientID%>').style.visibility = 'visible';//to show document.getElementById('<%=ButtonX.ClientID%>').style.visibility = 'hidden';//to hide