Click here to Skip to main content
15,897,315 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
XML
I would like to make an online seat reservation by using asp.net - vb.net with sql database.

I have 450 seats I use 450 buttons for this.like in this picture
<a href="http://i69.photobucket.com/albums/i76/tothanhtuan/button_zps5e1af237.png">http://i69.photobucket.com/albums/i76/tothanhtuan/button_zps5e1af237.png</a>[<a href="http://i69.photobucket.com/albums/i76/tothanhtuan/button_zps5e1af237.png" target="_blank" title="New Window">^</a>]

i want to make a query that looks which seats are booked and which seats are free.

The free seats buttons are blue and the booked are red. Suppose you book 2 seats name A1,A2 these 2 buttons will be disable.

Can someone help me ?
Posted
Comments
Sergey Alexandrovich Kryukov 21-Nov-13 21:35pm    
Can I unsee it?
—SA

1 solution

Traditional multi-select element would be a set of check boxes, but not buttons:
http://www.w3schools.com/jsref/dom_obj_checkbox.asp[^],
http://www.w3.org/TR/html-markup/input.checkbox.html[^].

If you need to check boxes looking like buttons (which I would not advise, because, on a disgusting-looking page sample you demonstrated, it's not so easy to see if the button are pressed down or not), or have some other custom look, mimic check box behavior with just a image (<img>) elements showing 2 or more states (like checked, unchecked, checked disabled, unchecked disabled, undetermined) through using different bitmaps it its src attribute. These different "src" values should be flipped by handling mouse/keyboard events of the images.

You can find many ready-to-use examples of such behavior and customize them further by just using your own bitmaps. For example:
http://tomekwojcik.github.io/jQuery-Custom-Checkboxes/[^],
http://webdesign.maratz.com/lab/fancy-checkboxes-and-radio-buttons/demo.html[^],
http://www.jquery4u.com/plugins/15-jquery-radio-button-checkbox-style-plugins/[^]… enough, I think.

You can find a lot more; using jQuery along it will give you this: http://bit.ly/I7Xqnj[^].

You main goal should be: don't do anything similar to the samples you referenced in your question; the users will hate it.

If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[^],
http://jquery.com[^],
http://learn.jquery.com[^],
http://learn.jquery.com/using-jquery-core[^],
http://learn.jquery.com/about-jquery/how-jquery-works[^] (start from here).

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900