View Single Post
Old May 3rd, 2008, 12:34 PM   #3
Robocop
Programmer
 
Join Date: Sep 2004
Posts: 44
Rep Power: 0 Robocop is on a distinguished road
Re: Clearing multiple textbox's text

I tried this, but I think it aint working because this is what it's doing:

"answer1.Text" = string.Empty;

which should be:

answer1.Text = string.Empty;

        ArrayList myList = new ArrayList();
        int n = 0;
        int max = 3;
        for (n = 1; n <= max; n++)
        {
            myList.Add("answer" + n + ".Text");
            object Answer = myList[0];
            Answer = string.Empty;
        }

Ps: how can this be posted as "c# code"?
Robocop is offline   Reply With Quote