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

looping textboxes

if i have smthing like.............

if (ht.ContainsKey(textBox7.Text))
{
object[] array = (object[])ht[textBox7.Text];
textBox1.Text = (string)array[0];
textBox2.Text = (string)array[1];
textBox3Text = (string)array[2];
//And so on
}

now is there any way by which i can loop on textboxes n in just two lines my work culd be possible instead of assigning values one by one to each textbox..................i hope u got it wat i m asking???

I mean smthing like

int j=0;

for(int i = 1; i <= (number of textboxes) ; i++)
{
textbox[i].text=array[j++];
}
Mar 6 '08 #1
0 698

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

Similar topics

2
by: ozgirl via AccessMonster.com | last post by:
Hi, hopeing someone can help me here... I have a deductions table and form and want to be able to add many deductions to the table by having only a few fields on the form form fields:...
3
by: Belee | last post by:
I always clear textboxes by using eg this.txtName.clear(); What is the best way of doing this to about 20 boxes or asignig values to them in C#.
7
by: Hai Nguyen | last post by:
I have another question. I'm trying to loop through all the textboxes on a web application. The snippet is below //foreach(WebControl ctr in Page.Controls) foreach(Control ctr in Page.Controls)...
4
by: Deasun O'Donnachadha | last post by:
Good evening, I have a panel with a number of labels and textboxes. I want to set the text boxes to readonly = false. This is what I have; Dim objTxtBox As New TextBox For Each objTxtBox In...
4
by: Nick | last post by:
Hi - I'm trying to loop through the textboxes on a page to unlock them for editing. The Enabled property is set to false, and the following code is on an 'Edit' button on the form. Can anyone tell...
2
by: Eric.I.Feurich | last post by:
Dear all, I'm trying to validate if information has been added in to textboxes and combo boxes. Private Function CheckValues() As Boolean '************************************************** '***...
4
by: bwalke | last post by:
I am developing a web form which is going to be used for manufacturing input. The form uses a DataList which list a batch of parts that may range anywhere from 1-9 parts. The DataList contains 6 ...
0
by: jobs | last post by:
I have a many many pages with many formviews with many textboxes in them. The matrix of types of validation I need to do is a giant mess so please don't judge the code you are about to see - I...
6
by: jobs | last post by:
This code was working, but then stopped working. I don't think I completely understand it. I pass it a formview name and it would loop through checking the value of textboxes. problem is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.