0
<asp:Table ID="tbl_Main" runat="server">
<asp:TableRow>
<asp:TableCell>
**<a href=""> </a>**
</asp:TableCell>
</asp:TableRow>
</asp:Table>
非常基本的吧?我可是从代码填充此背后是这样的:锚上动态创建的表
int rowCount = myset.Tables[0].Rows.Count;
int cellCount = myset.Tables[0].Columns.Count;
for (int rowCtr = 1; rowCtr <= rowCount; rowCtr++)
{
// Create new row and add it to the table.
TableRow tRow = new TableRow();
tbl_Main.Rows.Add(tRow);
for (int cellCtr = 1; cellCtr <= cellCount; cellCtr++)
{
// Create a new cell and add it to the row.
TableCell tCell = new TableCell();
tCell.ID = BuildMyPath(rowCtr.ToString(), cellCtr.ToString());
tCell.Text = "Row " + rowCtr + ", Cell " + cellCtr;
tRow.Cells.Add(tCell);
}
}
正如你可以看到香港专业教育学院增加了一个ID来,我想给小区的href内有其价值的T细胞。
现在我已经尝试过接近所有的eval表达式,但都没有工作。 基本上我想这样做:
<a href="<%= Eval("tCell.ID")%>"> </a>
谢谢。
我想避免使用g另一个div,并了解eval的用法 –