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 菜单控件打开弹出窗口(javascript),但我不能。菜单项不包含“属性”,所以我不能分配 javascript 代码。我该如何解决?谢谢你的建议
您可以在 NavigateURL 属性中设置 Javascript 调用
menuItem.NavigateUrl = String.Format("javascript:openPopup('{0}');", sURL);