User1729086557 posted
I have aspx form with several textboxes.They are populated with values from a table via retrieval of a dataview.
If the row count for the dataview is 0, then I'd like to reset the values in all textboxes. How can I loop through all the textboxes and set a default value?
I've tried the following, but no sucess.
For Each ctrl As Control In Page.Form.Controls
If TypeOf ctrl Is WebControls.TextBox Then
CType(ctrl, WebControls.TextBox).Text = ""
End If
Next
My first For Loop was using Page.Controls but it returned only 1 count.
The textboxes are inside a tabpanel (ajax), so do I have to locate the tabpage and then find all it's controls (for each tabpage)?