By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,120 Members | 1,799 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,120 IT Pros & Developers. It's quick & easy.

loop through textbox control at design time

P: n/a
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:TextBox Width="88px" runat="server" id="txtBore_Number1"/></
td>
<td><asp:TextBox Width="88px" runat="server" id="txtBore_Date1"/></td>
<td><asp:TextBox Width="88px" runat="server" id="txtNorthing1"/></td>
<td><asp:TextBox Width="88px" runat="server" id="txtEasting1"/></td>
<td><asp:TextBox Width="88px" runat="server" id="txtScale1"/></td>
<td><asp:TextBox Width="88px" runat="server" id="txtType1"/></td>
</tr>

.......

<tr>
<td><asp:TextBox Width="88px" runat="server" id="txtBore_Number10"/></
td>
<td><asp:TextBox Width="88px" runat="server" id="txtBore_Date10"/></
td>
<td><asp:TextBox Width="88px" runat="server" id="txtNorthing10"/></td>
<td><asp:TextBox Width="88px" runat="server" id="txtEasting10"/></td>
<td><asp:TextBox Width="88px" runat="server" id="txtScale10"/></td>
<td><asp:TextBox 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_Number10.

Thanks a million in advance.

best regards,
mamun

Feb 27 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.