【发布时间】:2009-07-21 15:17:24
【问题描述】:
这是我的 C# 代码
protected void ibtCopiar_Click(object sender, ImageClickEventArgs e) {
GridViewRow grdrows = DGPlanilla.Rows[0];
TextBox tb1 = (TextBox)grdrows.FindControl("TextBox1");
string valor = tb1.Text;
if (valor != null || valor != "0")
{
foreach (GridViewRow grdrow in DGPlanilla.Rows)
{
grdrow.Cells[5].Text = valor;
}
}
}
这是我的按钮代码
当我调试时,我看到我在第一个框中的值被传递到列中的其他文本框,但是当它破坏页面时,只有第一个框显示我输入的值。其他 texboxes 不会改变。
【问题讨论】: