an example how to read all textboxes in form

Posted on 2006-04-21
Medium Priority
Last Modified: 2010-04-07
can anyone find me something (link or example) how to read all names and values from all the textboxes of a page.
The user will get a list of items with a textbox where the user should type the amount or any other value.
I'll use something like the repeat region (dreamweaver) to make these rows from Sql server 2000.
After all values are set the user should click at the button "update all".

I dont prefer the datagrid because you have to (clickon) edit each time you want to edit one record.

Please show me the aspx example using VB.

thank you guys

Question by:bdsnv
  • 2
LVL 35

Accepted Solution

mrichmon earned 1000 total points
ID: 16511469
All you need to do is name your textboxes using a numeric ending.

Such as:


Then in the code behind of the aspx page you have a loop that iterates over the textboxes appending the current index of the loop to the name of the textbox.

Author Comment

ID: 16514323
no problem naming the textboxes. I can put the id-field e.g. tbox1001,tbox1002 and so on.

can you show me the loop in vb?
Dim loopresult
Dim fieldID
Dim fieldValue

   loopresult=loopresult & fieldID & "=" & fieldvalue";"

something simple like that.

 I can send this loopresult to sql server where i can update the records individualy with e.g.  triggers /procedures.
LVL 35

Expert Comment

ID: 16535493
I am not a VB person....

Assisted Solution

castrum earned 1000 total points
ID: 16677237
I think you can use "recordcount"... for example your rs is myRS
first descbe your rs parameters like connection etc. then add
"myRecords=myRS.recordcount"(it returns an integer)

After that you can use For ... Next like that:

for x= 1 to myRecords
      loopresult=loopresult & fieldID & "=" & fieldvalue";"
      myRS.movenext ' step forward for next record

I hope this works

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
Suggested Courses
Course of the Month15 days, 12 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question