hi,
I'm doing some app that I need to put mysql data into my button name
example i have 3 mysql data
data1, data2, data3
then i use some like this, to change my button name
but what i got is just the last data for all my button.
I can get it works but I have to put 1 by 1, that if i have a new record in database i have to put it manually, something like this
I want to make my button become data1, data2, and data3 using loop, is it possible ? please help me..
I'm doing some app that I need to put mysql data into my button name
example i have 3 mysql data
data1, data2, data3
then i use some like this, to change my button name
Code:
For Each btn As Control In Me.Controls
If TypeOf btn Is Button Then
For i = 0 To tables.Rows.Count - 1
btn.Text = tables.Rows(i)("dataName")
Next
End If
Next
I can get it works but I have to put 1 by 1, that if i have a new record in database i have to put it manually, something like this
Code:
button1.text = tables.Rows(0)("dataName")
button2.text = tables.Rows(1)("dataName")
button3.text = tables.Rows(2)("dataName")