我希望能够使用后面的代码来设置表格中单元格的值
<asp:Table ID="Table1" runat="server" CellPadding="10"
GridLines="Both" HorizontalAlign="Center" BackColor="Cornsilk">
<asp:TableRow ID="Row1">
<asp:TableCell ID="Cell1"></asp:TableCell>
Run Code Online (Sandbox Code Playgroud)
这可能吗?
成功runat=server:
<asp:TableCell runat="server" ID="Cell1"></asp:TableCell>
Run Code Online (Sandbox Code Playgroud)
你可以直接从codebehind访问它:
Cell1.Text = "New Value";
Run Code Online (Sandbox Code Playgroud)
否则你可以通过Rows和Cells表访问它:
Table1.Rows[0].Cells[0].Text = "New Value";
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8846 次 |
| 最近记录: |