Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loop through the textboxes in a form - check my code

Status
Not open for further replies.

rahmanjan

Programmer
Apr 13, 2003
180
AU
hi all,

I am trying to simply loop through all the textboxes in a from by the following code. But raises error>

frmCds parentForm=new frmCds();

foreach (TextBox obj in parentForm)
{
obj.Text="test";
}

regards,



 
And quite rightly.....

You're looping all the objects on the form, not just the textboxes.

Craig
 
thanks mate,

But unfortunately my .net installation is not complate and my help file doesn't work ... ;(

regards

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top