With .NET, control collections are gone (and for good reason too! ;) ). What
you can do is create an object collection and add the individual controls to
that collection and then modify them that way.
IE:
LinkButton lb1 = new LinkButton();
LinkButton lb2 = new LinkButton();
LinkButton lb3 = new LinkButton();
LinkButton lb4 = new LinkButton();
LinkButton[] linkbuttons = { lb1, lb2, lb3, lb4 };
foreach(LinkButton lb in linkbuttons)
{
lb.Text = "Hello There";
}
---or---
for(int i=0;i<linkbuttons.Length;i++)
{
linkbuttons[i].Text = "I am link button " + i.ToString();
}
HTH,
Bill P.
"wpy" <wp*@3ntity.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,
Does anybody know how to create multiple control with same ID or name in
asp.net and request the controls's value in array form? For example the
vb control can have same same but with different index.
Thanks.