473,809 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

loop through textbox control at design time

Hi All,
I have the following situation.
I have 10 rows in a form. In each row there are six textbox controls.
The users can enter any number of rows of records (either none or upto
10). I have created these textboxes at design time.

<tr>
<td><asp:TextBo x Width="88px" runat="server" id="txtBore_Num ber1"/></
td>
<td><asp:TextBo x Width="88px" runat="server" id="txtBore_Dat e1"/></td>
<td><asp:TextBo x Width="88px" runat="server" id="txtNorthing 1"/></td>
<td><asp:TextBo x Width="88px" runat="server" id="txtEasting1 "/></td>
<td><asp:TextBo x Width="88px" runat="server" id="txtScale1"/></td>
<td><asp:TextBo x Width="88px" runat="server" id="txtType1"/></td>
</tr>

.......

<tr>
<td><asp:TextBo x Width="88px" runat="server" id="txtBore_Num ber10"/></
td>
<td><asp:TextBo x Width="88px" runat="server" id="txtBore_Dat e10"/></
td>
<td><asp:TextBo x Width="88px" runat="server" id="txtNorthing 10"/></td>
<td><asp:TextBo x Width="88px" runat="server" id="txtEasting1 0"/></td>
<td><asp:TextBo x Width="88px" runat="server" id="txtScale10 "/></td>
<td><asp:TextBo x Width="88px" runat="server" id="txtType10"/></td>
</tr>

I will have to run query for each of the entered rows by Bore Number
and will be inserting into the databases.

How I can check how many rows the users entered data in the bore
number field and write the simple query to insert into table. The
entered data to check by txtBore_Number1 , txtBore_Number2 and so on
upto txtBore_Number1 0.

Thanks a million in advance.

best regards,
mamun

Feb 27 '07 #1
0 1362

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

Similar topics

12
5826
by: Phill | last post by:
I'd like to have textboxes that only allow certain types of data. Like only integers, decimals, etc. Is it better to subclass TextBox for each type or to create only one new TextBox class that has a property or method that makes it act approprietly? Making multiple objects seems like it would be easier to use at design time but I don't know if it's kind of inefficient to have so many classes that could be combined.
3
4026
by: bitwxtadpl | last post by:
I want to programmatically set the position of a cursor in a textbox that has focus based on a X and Y value. However, when I send a WM_RBUTTONDOWN and a WM_RBUTTONUP message to the textbox it selects the text from where the cursor is to where I want the cursor to be. All I want is to move the position of the cursor based on a X and Y values, not select the text. The code to recreate the issue.
2
8407
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when submitting the form to update the database. The server doesn't have the client side value any more. It seems to me that as I begin to write the client side javacript code for form validation and client side editing capabilities in order to save...
2
3923
by: Pham Nguyen | last post by:
Has anyone seen an example of a textbox server control that has built-in client-side validation? I'd like to build a server control that extends the System.Web.UI.WebControls.TextBox class to allow javascript checks for things like valid e-mail addresses or phone numbers (without having to add a separate control for validation). One idea I did some work on was having the control implement the IValidator interface and basically recreating...
11
4584
by: Keith | last post by:
I apologize for those of you who think I'm posting on the same topic. It is not that I don't appreciate all of your comments - and I'm definitely reading them all - but I think I have a differing opinion of how I want to handle the 'user experience' in the application I'm creating. While I know I could allow the user to enter in number and alpha text - in a text box - and then tell them when the execuate a command "This is not numeric data", I...
8
2530
by: dominique | last post by:
Hi, Is it possible (in vb.net with WinForms) to loop throw controls inside a container (form or panel) sorting the controls on a property (.tabindex for example) ? My problem : on several forms (or panels), i have many controls (inherited controls from base controls : MyTextbox, MyCombobox ..). I add a new property on these controls : .BeginningGroup (boolean : yes or no).
6
2281
by: david | last post by:
I try to use "for" loop to retrieve and assign values in web form. The code is in the following. But it can not be compiled. What I want to do is: txtQ1.Text = ds.Tables("mmsSpecRecord").Rows(0)("Q1") txtQ2.Text = ds.Tables("mmsSpecRecord").Rows(0)("Q2") ..... txtQ10.Text = ds.Tables("mmsSpecRecord").Rows(0)("Q10") ------code ------- Dim field As String = "Q"
7
9784
by: david | last post by:
I try to use "for" loop to assign textbox control ID to a textbox variable in server side codebehind for a web form. But I met some problem. What I want to do is solving the following-like code by a loop: static code: txtQ1.Text = ds.Tables("mmsSpecRecord").Rows(0)("Q1") txtQ2.Text = ds.Tables("mmsSpecRecord").Rows(0)("Q2") ..... txtQ10.Text = ds.Tables("mmsSpecRecord").Rows(0)("Q10") where Q1, .. Q10 are field name of a table; and...
6
1574
by: kberry | last post by:
I am clearing Textboxes on a form... this is loop I have came up with but was wondering if it can be shorter or not as long... Can anyone help? Dim controlOnForm As Control 'Places a control on the form Dim controlOnTab As Control 'Places a control on the tab Dim controlTabPage As Control 'Places a control on the tab page Dim controlGroupBox As Control 'Places a control on the group box
0
9602
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10639
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10383
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7661
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.