说我有这样一张桌子:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>TableCell Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>TableCell Example</h1>
<asp:table id="Table1" runat="server"
CellPadding="3" CellSpacing="3"
Gridlines="both">
<asp:TableRow>
<asp:TableCell Text="(0,0)" />
<asp:TableCell Text="(0,1)" />
<asp:TableCell Text="(0,2)" />
</asp:TableRow>
<asp:TableRow>
<asp:TableCell Text="(1,0)" />
<asp:TableCell Text="(1,1)" />
<asp:TableCell Text="(1,2)" />
</asp:TableRow>
</asp:table>
</div>
</form>
</body>
</html>
如何在代码中获取单元格的值。像这样:
For Each row As TableRow In objTable.Rows
'How do I get the value of a cell here by ID?
Next
您可以按索引获取单元格值吗?