473,396 Members | 1,676 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,396 software developers and data experts.

declaring buttons in array format

vb 2005
what i have is an interface designed to act like an order form at a bookstore, like the one a clerk would use to ring up a customer for books. The btnList button connects all the textboxes in the gui to an msaccess database with all the information about pricing and what courses the textbooks correlate to. the best way for me to describe it is a row of textboxes for inputs for isbn#, textbook name, the course it correlates to, pricing, quantity etc. with three buttons to the right of this row in line with it. what i want to do is have an "add" button amongst those three buttons to the right which will add the item to the total and create a new row of textboxes and a new set of three buttons. the only way i can think of to do this would be to use arrays to define the controls (textboxes and buttons), but, apparently, in 2005 and .net, you can't declare a control in an array. so my question is how do i sidestep declaring the controls in an array without devoting 500 pages of code to this one process?
Dec 2 '07 #1
3 1251
nateraaaa
663 Expert 512MB
You could use asp:panel control to hide the buttons you don't need until the Add button is clicked. Then when the user clicks the Add button turn the visible property of your panel to true and display the other controls (buttons and textboxes) within your panel. Should be pretty straightforward.

Nathan
Dec 4 '07 #2
how does the asp:panel control work? i've never heard of this
Dec 5 '07 #3
nateraaaa
663 Expert 512MB
how does the asp:panel control work? i've never heard of this
That is basically an html panel with a runat=server. This way you can create a panel put any controls that you want inside of it (textboxes, buttons, labels, etc...) and then hide all of those controls until a certain event happens. Then lets say a button is clicked you change the visibility of your panel to true which will display all of the controls within the panel (unless the visible property of a control in the panel is set to false). See this site for an example of using a panel control.

panel control example

Nathan
Dec 5 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

23
by: Phil Powell | last post by:
<b>Agency 4</b> <input type="radio" name="permission" value="1" checked> Yes <input type="radio" name="permission" value="0" > No <br> <b>Agency 5</b> <input type="radio" name="permission"...
29
by: Friday | last post by:
Sorry if this is the wrong group. I tried to find the one I thought would be most relevant. I'm an old PHP guy, who knows little about asp and NOTHING about asp.net, but need to learn at least...
2
by: Jeff | last post by:
I'm trying to create a dynamic form that can have multiple groups of radio buttons (each group has two buttons) with the same name. Essentially, the form allows a user to enter as many names as...
6
by: juli | last post by:
Hello, I need a control which will contain radio buttons that will be added in a loop. I am using this control a source of some other control. I tried to use group box windows control and to add...
3
by: mark | last post by:
When I declare an array as double(,) then try to use it I get an error: "Object reference not set to an instance of an object." I have found that I can redim the array and all is well. Is my...
11
by: dana1 | last post by:
I have a form which contains some buttons. The buttons use some of the standard images that come with access 2003 (e.g., the move next record image, or the sort ascending/descending images). The...
2
by: Lou | last post by:
I want to dynamically create an unknown amount of buttons into a panel. I want each button to respond to the same click event. In VB6 I would just create an array of buttons. I do know how to...
4
by: Peter Duniho | last post by:
On Thu, 14 Aug 2008 18:56:00 -0700, Phill <Phill@discussions.microsoft.comwrote: For future reference, if you are asking for help with an error (compile or execution), you really should post...
4
by: Fred Blair | last post by:
Where is the correct place to declare an array so that it will be available anywhere in the project. I have been playing with one form that has two buttons and one listbox. I want each button...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.