dynamic controls and accessing their text values

O

OguzhanF

I have a list box of products a coffee machine has to
produce, that the user
can choose from. After they do their selection of
products, into a panel
control i dynamically create textboxes with id's text1,
text2 ....

i need to read in the values entered in the text boxes.

when i try to access the textboxes with the following code
from MSDN, it
tells me the "Object reference not set to an instance of
the object. "

dim lbl as label
lbl = ctype(panel1.findcontrol("text1"), Label)

'error on this line

lblSomething.text=lbl.text

I can see the text1 dynamic control on the page, but
cannot access its text
property, any help is appreciated thanks in advance...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top