|
|
|
Click here to copy the following block |
Sub ResetControls(ByVal ParamArray ctls() As Control) Dim ctl As Control For Each ctl In ctls If TypeOf (ctl) Is TextBoxBase Then CType(ctl, TextBoxBase).Text = "" ElseIf TypeOf (ctl) Is CheckBox Then CType(ctl, CheckBox).Checked = False ElseIf TypeOf (ctl) Is RadioButton Then CType(ctl, RadioButton).Checked = False ElseIf TypeOf (ctl) Is ListView Then CType(ctl, ListView).Items.Clear() ElseIf TypeOf (ctl) Is TreeView Then CType(ctl, TreeView).Nodes.Clear() ElseIf TypeOf (ctl) Is ListBox Then CType(ctl, ListBox).Items.Clear() ElseIf TypeOf (ctl) Is ComboBox Then CType(ctl, ComboBox).Items.Clear() CType(ctl, ComboBox).Text = "" End If Dim c As Control For Each c In ctl.Controls ResetControls(c) Next Next End Sub |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|