Microsoft
Software
Hardware
Network
Question : Can I create an array of objects?
I'm rebuilding and app from VB6 to a web application using Silverlight 3 and vb.net. I have a group of 10 products that are continuously used throughout the application. In VB6 a created arrays of textboxes and labels to load all of the information pertaining to the products.
Dim i as integer
For i = 0 to 9
txtPrice(i).text = "database value"
txtCost(i).text = "database value"
next
Trying to do the same thing here but I'm not seeing a way to create an array of textboxes or labels in Expression Blend. Is it possible?
Thanks!
Answer : Can I create an array of objects?
Don't think you can create index on xaml.
You can use Textbox0, Textbox1 etc
and then use FindName to access
ie
for (i=0; i< 10; i++)
{
TextBox t = (TextBox)this.FindName("Te
xtbox" + i.ToString());
t.Text = "database value"
}
Random Solutions
How to make Access 2007 application run on a machine without Access?
Message size limited using SendObject?
Converting an Access Date/Time column's value to a DateTime object
How do I move a worksheet from one spreadsheet to another, while keeping all formulas exactly the same (so it doesn't move the file name with it)?
excel rows get cut off
auto log off and close forms if idle problem
Access VBA Code with Excel Object Save As just started generating the Automation Error - The server threw an exception.
Access 2003 SELECT Query from two tables base on date
Installing table relationship via vba... Part 1
How do I use the debugger in Microsoft Access?