0
我还想将其存储在字符串中以检查条件。如果满足条件,再次设置新值。 string s = HtmlCell.Attributes [“class”] 不起作用 我已经添加了runat =“server”并为其添加了一个id。但我想HtmlCell.Attributes [“类”]不能被投入到一个字符串。我想访问'class'属性的值。我如何访问代码隐藏内容中的元素的“class”属性值
我还想将其存储在字符串中以检查条件。如果满足条件,再次设置新值。 string s = HtmlCell.Attributes [“class”] 不起作用 我已经添加了runat =“server”并为其添加了一个id。但我想HtmlCell.Attributes [“类”]不能被投入到一个字符串。我想访问'class'属性的值。我如何访问代码隐藏内容中的元素的“class”属性值
确保您的TD或者是<asp:tableCell>
或<td id="sometd" runat="server">
,比你可以访问/修改sometd.cssClass