an example how to read all textboxes in form

Posted on 2006-04-21
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
    LVL 35

    Accepted Solution

    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

    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

    I am not a VB person....
    LVL 1

    Assisted Solution

    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

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
    When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure ( It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
    The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
    The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

    732 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now