Easy Constructor

  • Thread starter Thread starter Salsa_Dancer
  • Start date Start date
S

Salsa_Dancer

Hi forum,

I have this constructor inside a class that derives from
webcontrol

public example()
{
for(int i=0;int<num;i++)
{
//MyGroup is an array of TextBoxes Property inside
//the class
this.MyGroup=new TextBox();
this.Controls.add(this.MyGroup);


}
}
My question is very easy... I would like to know hoy can i
manage the variable num in the loop... Cause i have
another class that returns to me a number of elements
depending of a query in a database... I would like to show
as many TextBoxes as results in my query...

Thanks to all.
Regards.
The Salsa Dancer.
 
Salsa_Dancer said:
Hi forum,

I have this constructor inside a class that derives from
webcontrol

public example(int num)

public example()
{
for(int i=0;int<num;i++)
{
//MyGroup is an array of TextBoxes Property inside
//the class
this.MyGroup=new TextBox();
this.Controls.add(this.MyGroup);


}
}
My question is very easy... I would like to know hoy can i
manage the variable num in the loop... Cause i have
another class that returns to me a number of elements
depending of a query in a database... I would like to show
as many TextBoxes as results in my query...

Thanks to all.
Regards.
The Salsa Dancer.
 
Back
Top