Hi,
Currently i have my buttons labelled and positioned as follow :
x0_y3 | x1_y3 | x2_y3 | x3_y3
x0_y2 | x1_y2 | x2_y2 | x3_y2
x0_y1 | x1_y1 | x2_y1 | x3_y1
x0_y0 | x1_y0 | x2_y0 | x3_y0
What I'm trying to do is fill the buttons name programatically. So far I will get X and Y values and i need to change the text of that button at that position.
I know it's possible to do x0_y3.text = xxxx for each position but this will take years, i'm looking for a solution using a loop or some other technique to easily replace the text values. and the buttons are under an updatepanel.
ex :
GIVEN : xx=2 yy=2
ex. WHERE IT IS "x" & xx and "y" & yy
REPLACE TEXT WITH "hello"
I tried something like this, but it doesn't work with the updatepanel for some reason, but it works fine if i use a simple panel
Pease let me know if you have any quesitonsCode:For Each c As Button In UpdatePanel1.Controls.OfType(Of Button)() MsgBox(c.ID) c.BackColor = Drawing.Color.Yellow Next
Thank You




Reply With Quote