G
Guy Noir
Hello again.
Quick Question:
I have a series of labels on my asp.net c# page: lbl128d, lbl64d,
lbl32d, lbl16d, lbl8d, lbl4d, lbl2d, lbl1d
I would like to place these in an array so that I can loop through them
to assign values to them.
I have the controls places on my page and I create an array like this
in page_load:
fourthLabels = new Label[8] {lbl128d, lbl64d, lbl32d, lbl16d, lbl8d,
lbl4d, lbl2d, lbl1d};
When I try to loop through them, it says I'm dealing with a null
reference exception....
I'm guessing that I have the array in the wrong place (page_load vs
somewhere else) and the controls don't exists when I create the
array.....
Can this be done? If so can you point me in a direction that will lead
to a solution?
Thanks much. I learn so much from this newsgroup.
-Guy
Quick Question:
I have a series of labels on my asp.net c# page: lbl128d, lbl64d,
lbl32d, lbl16d, lbl8d, lbl4d, lbl2d, lbl1d
I would like to place these in an array so that I can loop through them
to assign values to them.
I have the controls places on my page and I create an array like this
in page_load:
fourthLabels = new Label[8] {lbl128d, lbl64d, lbl32d, lbl16d, lbl8d,
lbl4d, lbl2d, lbl1d};
When I try to loop through them, it says I'm dealing with a null
reference exception....
I'm guessing that I have the array in the wrong place (page_load vs
somewhere else) and the controls don't exists when I create the
array.....
Can this be done? If so can you point me in a direction that will lead
to a solution?
Thanks much. I learn so much from this newsgroup.
-Guy