473,387 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Control arrays or collections on Web Forms

I have items that are variable in number that I wish to display on a web
form. And I would like to be able to specify or access the contents of
item(x) by referenced the x elements of that array/collection.

I have tried something like the following on the form load event but though
I receive no build errors nothing ever shows on the form.

Dim ArrLabel(10) As WebControls.Label
For x = 1 To 10
ArrLabel(x) = New WebControls.Label
ArrLabel(x).Visible = True
ArrLabel(x).Text = "Label "
Page.Controls.Add(ArrLabel(x))
Next
Any help or guidance is appreciated.

Fred
Nov 20 '05 #1
1 876
I don't think there is something call control array in VB.NET. You didn't
mention what result your code got.

chanmm

"Fred" <fb******@centralstatesmfg.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I have items that are variable in number that I wish to display on a web
form. And I would like to be able to specify or access the contents of
item(x) by referenced the x elements of that array/collection.

I have tried something like the following on the form load event but though I receive no build errors nothing ever shows on the form.

Dim ArrLabel(10) As WebControls.Label
For x = 1 To 10
ArrLabel(x) = New WebControls.Label
ArrLabel(x).Visible = True
ArrLabel(x).Text = "Label "
Page.Controls.Add(ArrLabel(x))
Next
Any help or guidance is appreciated.

Fred

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Todd Schinell | last post by:
Back in July, Jeffery Tan posted this: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=OWOTdf0VDHA.2296%40cpmsftngxa06.phx.gbl In response as to how to get click events from a...
0
by: Chris Millar | last post by:
I have a user control that i wish to extend to change the date when the user selects the numeric up down button. The code explains itself, hope someone can help. any ideas appreaciated.. ...
0
by: Duncan Mole | last post by:
Hi, I have created a control which draws a title bar and provides a drop down menu for a Smart Device Application. It seemed to work fine until I came to add an event handler to act on Paint...
0
by: willow1480 | last post by:
I am developing a small little Service Control Application. I am using a listview control with checkboxes and getting the list of services I want to control from a text file. When you check a...
2
by: David K. | last post by:
My question concerns C# Windows Forms user controls. I have created navigation user control. It gets the parent control's CurrencyManager to its bindable property. In the control, any change in...
1
by: hledman | last post by:
Hello, Beginner here reading through murach's c# book and come to a point where the book doesn't give a good example of what they want you to do in the exercise. I've created an array with 5...
3
by: Sky Sigal | last post by:
I coming unglued... really need some help. 3 days chasing my tail all over MSDN's documentation ...and I'm getting nowhere. I have a problem with TypeConverters and storage of expandableobjects...
2
by: John | last post by:
Hello everyone, I'm currently writing a program to keep track of schedule changes at a school. The goal is to have someone using the program to declare changes, then the program writes a html...
1
by: Rob Griffiths | last post by:
Can anyone explain to me the difference between an element type and a component type? In the java literature, arrays are said to have component types, whereas collections from the Collections...
5
by: Brian Shafer | last post by:
Hi, I loved being about to use control arrays in vb classic. Doesn't look like i can do this in vb.net? Any input?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.