Dim txbNew As TextBox = GridView1.Controls(0).Controls(0).FindControl("newTextBox")很变态,但确实可行。

Protected Sub btnAddNew_Click()Sub btnAddNew_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Label1.Text = TypeName(GridView1.Controls(0)).ToString + " "
Dim EmptyChildTable As Table = GridView1.Controls(0)
Dim EmptyGridView As GridViewRow = EmptyChildTable.Rows(0)
Label1.Text = Label1.Text + EmptyGridView.RowType.ToString + " "
Dim txbNewCltName As TextBox = EmptyGridView.FindControl("txbNewCltName")
Label1.Text = Label1.Text + txbNewCltName.Text
End Sub发表于 @ 2006年05月22日 13:34:00 | 评论( loading... ) | 举报| 收藏