Vorrei evitare l'elaborazione di tutti gli If in ogni ciclo, cioé se per es. il primo If è verificato ( = il controllo in esame è un TextBox), deve passare al prossimo controllo senza elaborare i successivi If.codice:For Each Control As HtmlControl In fld_Edit.Controls If TypeOf Control Is TextBox Then With DirectCast(Control, TextBox) .Text = "" .Enabled = False End With End If If TypeOf Control Is DropDownList Then With DirectCast(Control, DropDownList) .Items.Clear() .Enabled = False End With End If If TypeOf Control Is Label Then DirectCast(Control, Label).Visible = False End If If TypeOf Control Is Button Then DirectCast(Control, Button).Enabled = False End If Next

Rispondi quotando