c# - 访问 ASP.NET 表中的控件

标签 c# asp.net vb.net

我的问题是关于 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/

相关文章:

c# - 面板固定位置

c# - 重用 session 标识符

asp.net - RadControls for ASP.NET (telerik) 中的 OnClientClick 和 AJAX 不起作用

c# - asp.net 图表控件显示不正确的工具提示日期时间值

javascript - 如何在javascript中检查日期大于或小于的条件?

asp.net-mvc - 用于从 FQDN 中提取二级域名的正则表达式?

c# - C#取消订阅匿名方法

c# - 如何在用 C# 编写的 Selenium WebDriver(Nunit 测试用例)中按 "Enter"?

c# - 如果条件满足,如何测试 void 方法返回

javascript - ASP.NET MVC/Javascript : VideoJS media could not be loaded