473,587 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

declaring buttons in array format

22 New Member
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 1274
nateraaaa
663 Recognized Expert Contributor
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
captainphoenix
22 New Member
how does the asp:panel control work? i've never heard of this
Dec 5 '07 #3
nateraaaa
663 Recognized Expert Contributor
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
2441
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" value="1" checked> Yes <input type="radio" name="permission" value="0" > No <br>
29
4032
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 enough to convert a favorite PHP script to work on an ASP.NET site. I'm experimenting with simple example scripts that will help me learn how to...
2
3135
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 they want. If they need to add more, they click an "add name" button and the javascript inserts another row of input boxes. Each row should have...
6
11178
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 the radio buttons this way(in a loop): this.groupBox1.Controls.Add(radio); but I can see there only one radio button . How can I see all of them...
3
2179
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 approach proper here or is the a better way for setting the instance of this specific format for an array. -- mark
11
5310
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 default behavior for access is to give the button a "highlighted" appearance when the button is hovered with the mouse. My problem is that these...
2
1905
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 have multiple buttons respond to the same click event in ..NET but not if the number of buttons are not know until runtime are created dynamically ....
4
1647
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 the complete text of the error and be specific about when and where it happens. That said, in your code it's clear what's wrong:
4
1789
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 to add a name from an array to the list box. Unless I declare the array inside each button_click event, it says the array has not been declared. ...
0
7852
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8221
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5719
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.