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

build variable name programmatically

hi

I have 10 textboxes in a form named a1, a2, a3, a4,..... a10
when I press a button I want to perform 10 queries. every query should use
the value in a text box
how can I do it?
here is my code.
how can I let the "a" variable assume the value of the a1..a10 textboxes?
For i = 1 To 10
a = a1.Text
SqlDataSource3.InsertParameters.Add("movimento", id)
SqlDataSource3.InsertParameters.Add("importo", a)
SqlDataSource3.InsertParameters.Add("sessione",
Session.SessionID)
SqlDataSource3.Insert()
Next

thanks
Lenny

May 6 '07 #1
1 2040
"Lenny" <no****@la.dicowrote in message
news:Oj**************@TK2MSFTNGP05.phx.gbl...
how can I let the "a" variable assume the value of the a1..a10 textboxes?
For i = 1 To 10
Use FindControl
a = a1.Text
a = ((TextBox)FindControl("a" & i.ToString)).Text

Apologies if that syntax isn't exactly correct - I never go anywhere near
VB.NET...
--
http://www.markrae.net

May 6 '07 #2

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

Similar topics

2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
2
by: paladin.rithe | last post by:
I have no clue if this can be done, but I thought I'd ask anyway. I have a modular system where I store module information in a database. One of the types of modules that I have is one that,...
4
by: sydney.luu | last post by:
Hello, I would greatly appreciate if someone can show me how to dynamically build a Repeater with unknown number of columns at design time. I have looked various threads in this newsgroup,...
4
by: Zachary Turner | last post by:
Let's say I have a variable defined as follows: <xsl:variable name="test_variable_1" value="'test_value_A'"/> <xsl:variable name="test_variable_2" value="'test_value_B'"/> <xsl:variable...
1
by: kimkamp | last post by:
I want to create a variable name programmatically. For instance: Dim GlobVar as String = "My.STL." Dim VarName as String = "sAccountNo" Dim VarValue as String = "ABC123" I want to end up...
3
by: Andrea Raimondi | last post by:
Hello peers! I'm working on this application and I'm in need for some thoughtful advice :-p I have an SQLDataSource with params, select, etc. One of my params is the table name, which can be...
0
by: Akira Kitada | last post by:
Hi list, I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed to build some of the modules. """ Failed to find the necessary bits to build these modules: _bsddb ...
0
by: M.-A. Lemburg | last post by:
On 2008-10-25 08:39, Akira Kitada wrote: Please post a bug report on python.org about these failures. The multiprocessing module is still fairly new and obviously needs more fine tuning for...
0
by: Akira Kitada | last post by:
Hi Marc-Andre, Thanks for the suggestion. I opened a ticket for this issue: http://bugs.python.org/issue4204 Now I understand the state of the multiprocessing module, but it's too bad to see...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.