gpt4 book ai didi

c# - 代码隐藏中 DIV 的语法错误

转载 作者:行者123 更新时间:2023-11-28 13:50:07 24 4
gpt4 key购买 nike

我试图在下面暗示:

eventListingPanel.Controls.Add(new LiteralControl("<div style="overflow :auto; width:200px;  height:200px">"));

但我收到错误:

") expected"

上面代码中关键字overflow,auto,200px,200px的红色下划线

最佳答案

试试这个:

eventListingPanel.Controls.Add(new LiteralControl("<div style=\"overflow :auto; width:200px;  height:200px\"></div>"));

关于c# - 代码隐藏中 DIV 的语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11465644/

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