Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to enable false to all the text boxes in the form at a time ?
Posted
Updated 21-Sep-12 3:44am
v3
Comments
[no name] 21-Sep-12 9:42am    
Set their enabled property to false perhaps?
rajushyamu7 21-Sep-12 9:48am    
ya i need tat solution..
[no name] 21-Sep-12 9:49am    
And what have you tried? Iterate through the controls collection and set the textboxes enabled property to false.
joshrduncan2012 21-Sep-12 9:44am    
What exactly are you referring to? Are you wanting to enable text boxes programmatically or graphically set all textboxes to be enabled before execution?
rajushyamu7 21-Sep-12 9:47am    
programatically

1 solution

Try this...
C#
foreach(Control c in Controls)
{
   if(c is TextBox)
   {
      c.Enabled = true;
   }
}
 
Share this answer
 
Comments
Thanks for accepting...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900