473,397 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

array of textboxes- dynamic controls



Hey,

I am using the MultiView control to create a Wizard style web app. At
some point in the Wizard I need the user to input 2 values which
correspond to rows and columns. On the next step in the Wizard i
proceed to create and put in a View rows*columns textboxes. Here is
some of my code:

Global declaration: public TextBox[] textBoxBarCodes;

Code to write the textboxes to the view:
textBoxBarCodes = new TextBox[numRows * numCols];

int k = 0;
for (int j = 0; j < numRows; j++)
{
TableRow r = new TableRow();
for (int i = 0; i < numCols; i++)
{
TableCell c = new TableCell();
textBoxBarCodes[i] = new TextBox();
textBoxBarCodes[i].ID = k.ToString();
c.Controls.Add(textBoxBarCodes[i]);
r.Cells.Add(c);
++k;
}
tableView1.Rows.Add(r);
}

this.View1.Controls.Add(tableBarCodes);

Now my problem is that I can't reference back to the array of
textboxes. I know that I should be recreating each time on page init,
but I am unlcear how to do that in terms of the Wizard (i.e I only
know how many textboxes I need after several initial postbacks).

If someone could point me in the right direction that would be VERY
much appreciated.

Cheers

Apr 22 '07 #1
0 1114

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

Similar topics

3
by: ms_chika | last post by:
Hi again to all, I just want to know how to delete array or array object in javascript? I have this problem, i have an html table that contains textboxes and delete button for each row, the...
1
by: Stephen | last post by:
Was wondering if someone could please help me with an array I'd like to create in an asp.net page. I have to design an array which stores the values of addresses manually entered into textboxes...
9
by: NewInTheGame | last post by:
I'm a beginner in VB.Net. I'm actually taking a class & so far I understand everything, but I suck when it comes to arrays. I'm sure that this is simple (I'm ashamed of asking :oops: )... I...
3
by: John | last post by:
i have lists with 10 and more textboxes for example test1.text, test2.text ....i want as i could do in vb6 with just a copy-paste of the same textbox, to have an array like test(1).text,...
9
by: jan82 | last post by:
Hi everybody I declared a private static array of textboxes at the top of a class, then i generate the array elements (new textbox()) in a separate function (private void in the same class), ...
3
by: Jacob.Bruxer | last post by:
Hi, I want to be able to append text using a For loop to each textbox in an array of textboxes that I've created, called tBoxes(). Basically I want to add a number of spaces to each textbox in...
1
by: bethmiddy | last post by:
Hello, I am very new to programming and am currently taking a class on VB. This is probably very simple, I just don't get it. I am working on a group project where we need to have 3 columns and...
5
by: jvcoach23 | last post by:
I am trying to load an array on the load of a page to javascript. the script will eventually have parts being loaded from a database... this is just a first step to get there... Here is the code...
4
by: akshay01 | last post by:
Hi All, I am using the following code in which i am creating some textboxes and and as the for loop continues the name of the textboxes will also be unique for all the textboxes. now i want to...
2
HaLo2FrEeEk
by: HaLo2FrEeEk | last post by:
I'm making a program to help me upload files to my site en masse. I've already sorta created the commandline argument portion of it, but I want to create options for each filename passed via...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.