473,414 Members | 1,643 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,414 software developers and data experts.

create array of textboxes in code that equate to text boxes on form

I have 81 text boxes on a form and would like to create a text array in code that will equate to these boxes on the form. Once I've assigned each text box from the form to the array entry, I'd just like to work with the array - then have the actual text boxes on the form reflect the changes made to the array.
Is this possible, and if so, how?
Thanks.
Dec 18 '09 #1
4 2368
tlhintoq
3,525 Expert 2GB
Expand|Select|Wrap|Line Numbers
  1. TextBox[81] myTBarray = new TextBox[81];
  2. TextBox[0] = TextBox1;
  3. TextBox[1] = TextBox2;
  4. // And so on
Dec 18 '09 #2
Yes - thanks.
I did this - but I was hoping to find a way that if I changed the textbox array in code, that they would automatically update the real textbox's in the form. ( instead of having to explicitly say formtextbox=txtboxarray)
Thanks for your input though.
Dec 18 '09 #3
tlhintoq
3,525 Expert 2GB
TextBox[14].Text = "My new text";

You have an array of actual text boxes. Treat the array elements as your textboxes.
Dec 18 '09 #4
Yes - thanks.
I realized after I made the last post, that my actual text boxes in the form were being updated from the array.
(I haven't programmed for several years and have forgotten a lot of stuff!)
Dec 19 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: DG | last post by:
I have setup an HTML page were the user will be able to set the number of text boxes they want to enter data in. The number of text boxes will be saved as a hidden form variable. Below is a quick...
3
by: Varad | last post by:
Hi all Pls give me some insight as to what I should be doing. I have a form where I have 20 text boxes and when an user submits the form I save it to a database. When they want to retrieve it, I...
15
by: crjunk | last post by:
I have 4 TextBoxes on my form that I'm trying to add together to get a grand total. Here is the code I'm using: <SCRIPT LANGUAGE="JavaScript"> <!-- Beginning of JavaScript - function...
2
by: Steveo | last post by:
Hi I have a form containing some text boxes and a button. I'm trying to work out how to make it so that if certain textboxes contain no data then the button is not enabled (however still...
2
by: Savvas | last post by:
Hi everybody, I have a lot of textboxes on my form and a "Clear" button. Is there a way with a for loop or something to clear the textboxes, instead of writing textboxName.clear? Thanks a lot
0
by: Patrick | last post by:
I'm working on a contact management application, and need a hand with one aspect... Here's what I want to create: ------------------------------------ A form split into two parts. There is a...
13
by: Martin Ho | last post by:
I know this must be trivial for many of you. But I am playing with this and can't figure it out. I have a form, on that form is one panel which has 3 textboxes, when I run my program and...
5
by: k | last post by:
Hi, I have a problem. To edit the content of a text box in a form I can use the following code: document.getElementById('bugSteps').value = "data" But I can't figure how to do this in a...
0
by: micksey | last post by:
i have a form linked with access database. code goes like this: <%while not serv.eof %> <tr valign="top"> <td height="30"> <%=serv.fields("serialno") %> </td> <td> <input name="txtSCorCO"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.