ashim,
Yes. You can store all the controls in a Hashtable at startup and access
them from there by key.
Otherwise, what you what to do is more like
foreach (Control c in this.Controls0
{
if (c.id.Substring(0,2)=="tb')
// your cool stuff here
}
.... etc
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"ashim" wrote:
> i have textboxes with ids tb1,tb2,tb3...
> now i want to set text to these textboxes somehow like
>
> for (i=1;i<5;i++)
> ("tb"+i).Text = i;
>
> obviously it won't work.
> How to translate ("tb"+i) into actual control id?
> is there anyway to access properties of controls using ids stored in
> variables ?
>
> please help
> thanks a lot
>