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 dropdown disappear using code
Code not returning result unless a breakpoint is set!
Visual Studio 2008 Pro Trial does work with SQL 2008 CTP Trial
Exclude all records from a join which have two specific values in one table
recovering *Contacts* from an old .OST file???
For i=0 to UBOUND(RegValueName) Type Mismatch: 'UBOUND'
How to delete a word bookmark when the document is launched from an Access form?
Can't run eseutil on Exchange 2k3 server
Bootmgr is missing, trying to import image using Windows PE/Imagex
Deploying SP3 for XP via WSUS 2.0