我的问题是关于 ASP.Net Table 控件的。
将控件放入表格后,是否有任何方法可以访问控件属性?
问题是控件似乎没有以任何方式出现在属性窗口中。
我想知道除了转到 HTML 并在那里更改它们之外,是否有任何方法可以访问这些属性。
最佳答案
来自 asp:Table 上的 MSDN 文档:
It is important to remember that any programmatic addition or modification of table rows or cells will not persist across posts to the server. This is because table rows and cells are controls of their own, and not properties of the Table control. To persist any changes to the table, rows and cells must be reconstructed after each postback. In fact, if substantial modifications are expected, it is recommended that a DataList, DataGrid, or GridView control be used instead of the Table control. As a result, the Table class is primarily used by control developers.
您要构建服务器控件吗?
关于c# - 访问 ASP.NET 表中的控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17424856/