我想把页面上的所有TextBox设为空,就这样
For Each tb As Object In Me.Controls
If tb.GetType() Is GetType(TextBox) Then
CType(tb, TextBox).Text = ""
End If
Next
可是这么写不成功....
...全文
1182打赏收藏
怎么遍历页面上的所有控件
我想把页面上的所有TextBox设为空,就这样 For Each tb As Object In Me.Controls If tb.GetType() Is GetType(TextBox) Then CType(tb, TextBox).Text = "" End If Next 可是这么写不成功....