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

Copy content from one TextBox to several others

1
I want to copy a value from one textbox to several others, like:

TextBox2.Value = Textbox1.Value
TextBox3.Value = Textbox1.Value
TextBox4.Value = Textbox1.Value
etc up to 30
How can this be done by using a For Next loop?

For i = 1 to 30
"TextBox" & i & ".Value" = TextBox1.Value
Next i
May 22 '13 #1
1 1235
Try something like this,
Expand|Select|Wrap|Line Numbers
  1. string myTxt = TextBox1.Value
  2. Dim allTxt As New List(Of Control)
  3.    For Each txt As TextBox In FindControlRecursive(allTxt, Me, GetType(TextBox))
  4.        txt.Value = myTxt
  5.    Next
  6.  
May 22 '13 #2

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

Similar topics

16
by: Vince | last post by:
Hi, I have replaced my BYTE* by a vector<BYTE> and before I used to do : void CCardRecord::GetRecData(int nOffset, int nDataSize, CString& csValue) { BYTE *pTmp = NULL; pTmp = new BYTE;...
8
by: Michael SL | last post by:
I have been looking in the newsgroup but cannot find what I need. I am using Visual Studio to to build a VB.Net application using System.Web.UI.Page NOT windows.forms. The server fills a textbox...
1
by: Samuel R. Neff | last post by:
Is there a way to copy content files to the build directory in vb.net? In C# you can use build-events but I don't see them anywhere in a VB project. Thanks, Sam B-Line is now hiring one...
1
by: Hack12 | last post by:
Hi, is there a program that will let me copy the javascript content that is in a browser. I need to save content locally so I can view it when offline. The way it shows up is in a new window in IE....
26
by: saxenavaibhav17 | last post by:
what is Deep Copy, Shallow copy and Bitwise copy, Memberwise copy? and what is the difference between them? pls help vaibhav
3
by: YMPN | last post by:
Hi Everyone, I'm deen from Riyadh. Please do help me with some problem i have. I have this formview control setup to recieved inputs from user (textbox, dropdownlist, others). After...
1
by: vjunkl | last post by:
Hello, I have a content text file in my project and I'd like to copy it to a folder at some point in the execution of the application(not during a build). If this is not possible, how about...
1
by: zeny | last post by:
Hey folks! Can anyone tell me how to add data to a table using "copy" with several delimiters? Is it possible? What i mean is: Copy <table_name> from <file_directory> using delimiters...
1
by: mattmao | last post by:
I am doing a ASP.NET porject, inside a asp control tag there are some textboxes for users to input data. Later they can take previously entered data out of those textboxes. To provide better UI...
4
by: jollycottage | last post by:
Please can anyone help? I have several recordsets containing the same number of records and each record having 2 fields. One recordset being the primary the others secondary. I what to compare...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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)...
0
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.