0

hi guys,

i am doing a project on vb, now the issues is i am not able to retrive the data from the textbox which in created during runtime. i created 5 textboxes in runtime, i enter the datas for each textbox, but i couldnt read the same. can anyone help me on this. plzzzzzzzz

5
Contributors
4
Replies
24
Views
3 Years
Discussion Span
Last Post by Deep Modi
0
Dim txtString as String
txtString=Trim(textbox1.Text)

This will work only if you have not created a textbox array. The best is to show us the code you use to create your textboxes to receive sensible help

0

hi do you specify names for the textboxes i.e. something like this:

sub CreateTextboxes()
    dim i as integer =0
    dim txtbox as textbox
    do while i < 5
        txtbox =  new textbox
        txtbox.name = "TxtBox" & i
        '....
        i = i + 1
    wend
end sub

If so you should be able to specify by name

0

as G Waddell describe, You should specify the textboxname:

    sub CreateTextboxes()
    dim i as integer =0
    dim txtbox as textbox
    do while i < 5
    txtbox = new textbox
    txtbox.name = "TxtBox" & i
    '....
    i = i + 1
    wend
    end sub

and then ttry to call data from text box.
I also think this is the reason you may not call the data.
as like:
on buttin click: messagebox.show(textbox1.text)
if solutin don't work then please elaborate your thread

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.