gpt4 book ai didi

c# - 使用 C# 代码在 HTML 中设置表格行的可见性?

转载 作者:太空宇宙 更新时间:2023-11-04 14:20:12 25 4
gpt4 key购买 nike

我想在 html 代码中使用 DateTime.Now.Month 显示/隐藏表格行,但我不记得正确的语法。我的意思是上面,但不是以这种方式工作。正确的语法是什么?提前致谢

<tr style='<%# DateTime.Now.Month==11? "display:none": "display:inline"%>' ></tr>

最佳答案

DateTime.Now.Year 可能应该是 DateTime.Now.Month

关于c# - 使用 C# 代码在 HTML 中设置表格行的可见性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13863245/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com