I don't understand what you mean by 'assign a name for control dynamically'
but if you want to construct id of your controls as a string you should use
FindControl as follows.
for (int i = 1; i < 10; i++)
{
Label lb = Page.FindControl(String.Format("label{0}", i)) as Label;
if (lb != null)
{
lb.Text = i * 2;
}
}
Regards,
Ladislav Mrnka
miladhatam@gmail.com - 26 Jan 2007 16:58 GMT
thanks Ladislav
sorry i am not english
your help was correct and it is working now
thanks for your good help