|
-
Apr 18th, 2013, 08:43 PM
#1
Thread Starter
Frenzied Member
filling multiple button values
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
Code:
For Each c As Button In UpdatePanel1.Controls.OfType(Of Button)()
MsgBox(c.ID)
c.BackColor = Drawing.Color.Yellow
Next
Pease let me know if you have any quesitons
Thank You
Last edited by met0555; Apr 18th, 2013 at 08:56 PM.
-
Apr 18th, 2013, 09:37 PM
#2
Re: filling multiple button values
I don't see any asp.net related problem.
Ask to move this to the regular vb.net thread.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Apr 18th, 2013, 09:41 PM
#3
Thread Starter
Frenzied Member
Re: filling multiple button values
well, i'm doing this on ASP.NET, and some of the solution used on the windows based VB.NEt not always work on ASP.NEt
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|