-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: SatheeshSugumaran
Message 4 in Discussion

Hi            Assuming tht u want to clear the text for the controls available in a 
webpage i'm posting the following code   
-----------------------------------------------------------  
Dim ctrlChildCtrl As Control 
Dim txtTemp As TextBox 
Dim dropTemp As DropDownList 
For Each ctrlChildCtrl In ctrl.Controls 
If ctrlChildCtrl.Controls.Count > 0 Then 
ClearAllControls(ctrlChildCtrl) 
End If 
If TypeOf ctrlChildCtrl Is System.Web.UI.WebControls.TextBox Then 
txtTemp = CType(ctrlChildCtrl, TextBox) 
txtTemp.Text = "" 
ElseIf TypeOf ctrlChildCtrl Is System.Web.UI.WebControls.DropDownList Then 
dropTemp = CType(ctrlChildCtrl, DropDownList) 
dropTemp.SelectedIndex = -1 
End If 
Next 
---------------------------------------------------------------------- 
the above given code works fine to clear textbox and dropdownlist ..u can modify this 
for someother controls too.. 
Regards 
Satheesh Sugumaran 
Malleable Minds Software 
  
 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to