Forum Discussion

Ravik's avatar
Ravik
Super Contributor
12 years ago

Get all Text box from the form

Hi,



In our application we have a form that is contain 10 text Boxes. I want to take all text boxes and using loop I want to be insert different values. How we can do this.

Please help us.



Thanks

Ravik
  • I think you should use Child method - something like this:



    var v = 0;

    for (var i = 0; i < form.ChildCount; i++)

    {

      if (form.Child(i).Name == "TextBox")

      {

        form.Child(i).wText = valueArray;

        v++;

      }

    }
  • I think you should use Child method - something like this:



    var v = 0;

    for (var i = 0; i < form.ChildCount; i++)

    {

      if (form.Child(i).Name == "TextBox")

      {

        form.Child(i).wText = valueArray;

        v++;

      }

    }
  • Ravik's avatar
    Ravik
    Super Contributor
    Hi,



    Your example is very helpful for us. could you please help me.



    How to get all "TextBoxes" if it is place in gridview.



    Please help us



    Thanks

    Ravik