472,373 Members | 1,547 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,373 software developers and data experts.

Easy Constructor

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[i]=new TextBox();
this.Controls.add(this.MyGroup[i]);
}
}
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.
Nov 15 '05 #1
2 2263
Tim
instead use:


int iMax = myDataSet.Tables["yourTableName"].Rows.Count;

sorry about that.
Nov 15 '05 #2

"Salsa_Dancer" <an*******@discussions.microsoft.com> wrote in message
news:00****************************@phx.gbl...
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[i]=new TextBox();
this.Controls.add(this.MyGroup[i]);
}
}
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.

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jun | last post by:
I have following script <script> var Animal = function(name){ this.name = name; } Animal.prototype.eat = function (food) {
15
by: A | last post by:
Hi, A default copy constructor is created for you when you don't specify one yourself. In such case, the default copy constructor will simply do a bitwise copy for primitives (including...
2
by: jm | last post by:
I got the code below from the .NET SDK. I am still new to C# and I don't understand how the code works. And by that I mean I don't understand how the program knows to execute it. I can find no...
45
by: Ben Blank | last post by:
I'm writing a family of classes which all inherit most of their methods and code (including constructors) from a single base class. When attempting to instance one of the derived classes using...
10
by: Brian | last post by:
Hello all, I have an form to Enter a Name with letters from A to Z in buttons. When you click a button, it should append the text associated with that button to a text box. Instead of...
6
by: Tim Geiges | last post by:
I am trying to open an image in a little image viewer I wrote(it has its own file explorer but I want it to also open from Windows Explorer) When I select an image from widows explorer and use...
6
by: Henryk | last post by:
I did a lot of delphi GUI programming recently. In my experience most of the time you just want to throw a standard exception with a descriptive message. Then all calling functions can handle...
74
by: Zytan | last post by:
I have a struct constructor to initialize all of my private (or public readonly) fields. There still exists the default constructor that sets them all to zero. Is there a way to remove the...
0
by: TonyJ | last post by:
Hello I'm rather new to this with windows service. I want to get a better understanding because I must use it if I don't want to use a console application- I have three important methods below....
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.