hii...i m a newbie in asp .net... im makin project on online ticketing...
i m concentrating mainly on the available tool and doing little bit of coding
now i m struck on a page where a person can book his seats...for this i used 50 image buttons depicting seats...red in colour...now i want this to connect with my sql database

where i ve given seat status 1 and 0...i want all seat status with 0 to remain red and those seats with 1 status should go green...person can then select from those red seats and the one he selects become grey.......basically i want to conect image buttons to conect to database which change their colour dynamically according to dtabase...


pls help.....very mch needed......

Lusiphur commented: non-descriptive subject, no shown examples of attempted code +0

Recommended Answers

All 5 Replies

post your code
for general idea u have to check condition during execution time that if value is o then picute color red if 1 then green simple

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default6.aspx.cs" Inherits="Default6" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 100%;
            height: 367px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Panel ID="Panel5" runat="server" Height="508px" BackColor="#000066">
        &nbsp;
        <br />
        &nbsp;&nbsp;
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="X-Large" 
            ForeColor="#66CCFF" Text="SEAT   LAYOUT" BackColor="#000066"></asp:Label>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Button1" runat="server" BackColor="#99FF33" 
            Text="Proceed to payement" Width="251px" />
        <br />
        <br />
        <br />
        <br />
        &nbsp;&nbsp;&nbsp;
        <asp:Label ID="Label9" runat="server" BackColor="#000066" Font-Bold="True" 
            Font-Size="Large" ForeColor="#66CCFF" Text="Click on "></asp:Label>
        &nbsp;<asp:ImageButton ID="ImageButton102" runat="server" Height="17px" 
            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
        &nbsp;&nbsp;
        <asp:Label ID="Label11" runat="server" BackColor="#000066" Font-Bold="True" 
            Font-Size="Large" ForeColor="#66CCFF" Text="to occupy"></asp:Label>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="Label10" runat="server" BackColor="#000066" Font-Bold="True" 
            Font-Size="Large" ForeColor="#66CCFF" Text="Booked seats"></asp:Label>
        &nbsp;&nbsp;
        <asp:ImageButton ID="ImageButton101" runat="server" Height="17px" 
            ImageUrl="~/green.bmp" onclick="ImageButton1_Click" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="Label12" runat="server" BackColor="#000066" Font-Bold="True" 
            Font-Size="Large" ForeColor="#66CCFF" Text="Current selection"></asp:Label>
        &nbsp;
        <asp:ImageButton ID="ImageButton103" runat="server" Height="17px" 
            ImageUrl="~/grey.bmp" onclick="ImageButton1_Click" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Panel ID="Panel6" runat="server" Height="394px">
            <table class="style1">
                <tr>
                    <td style="color: #66CCFF">
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<asp:Label ID="Label7" runat="server" 
                            Text="E"></asp:Label>
                        &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<asp:ImageButton 
                            ID="ImageButton1" runat="server" Height="17px" ImageUrl="~/untitled.bmp" 
                            onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton51" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton52" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton53" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton54" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton55" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton56" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton57" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton58" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton59" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;49&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 48&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                        47&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;46&nbsp;&nbsp;&nbsp;&nbsp; 45&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 44&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;43&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;42&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 41<br />
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label6" runat="server" Text="D"></asp:Label>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton60" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton61" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton62" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton63" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton64" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton65" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton66" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton67" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton68" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton69" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 40&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;39&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 38&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                        37&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 36&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;35&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 34&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;33&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;31<br />
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label5" runat="server" Text="C"></asp:Label>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
                        <asp:ImageButton ID="ImageButton70" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton71" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton72" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton73" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton74" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton75" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton76" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton77" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton78" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton79" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 30&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;29&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 28&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                        27&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;26&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;22&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 21
                        <br />
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label4" runat="server" Text="B"></asp:Label>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton80" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton81" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton82" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton83" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton84" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton85" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton86" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton87" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton88" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton89" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 19&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                        17&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 14&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11<br />
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label3" runat="server" Text="A"></asp:Label>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton90" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton91" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton92" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton93" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton94" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton95" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton96" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton97" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton98" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="ImageButton99" runat="server" Height="17px" 
                            ImageUrl="~/untitled.bmp" onclick="ImageButton1_Click" />
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                        8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <br />
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label8" runat="server" Text="Screen this way"></asp:Label>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Image ID="Image1" runat="server" Height="16px" ImageUrl="~/aa.bmp" 
                            style="margin-left: 0px" Width="383px" />
                        &nbsp;
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </asp:Panel>
</asp:Content>

arc64;

While many people who regularly post in this site are generally very willing to help with regards to coding issues and what not, they are generally more willing to help if some example of the code you are trying to make work is included in your original post or some attempt to research the information is shown prior to posting.

Also, it generally helps to make your title of your post reflect the nature of the problem you are having so people can gauge at-a-glance whether it's a topic they may have some experience in without having to go into every single new post in the forums. "help me plssssssssssss" does nothing to explain the issue you are having and your question shows no attempt on your part to try to gain the information by other means or to attempt the coding on your own.

Please don't take this post as a slam against you, personally. I'm just trying to give some tips to help you get the help you need. If you've attempted the coding and your code isn't working, paste the code in your question enclosed in the code tags so people can see it. If you've attempted to find the information elsewhere and are still drawing blanks, let people know where you've looked so they can see the effort was made.

As for your question... the way you've stated it it seems as though your primary option (and this depends on how you labelled your seat image buttons) is a loop from seat 1 through 50 that checks the corresponding database row and adjusts your seat button properties depending on availability. If you've made your buttons as images treated as buttons then you may need to physically swap images to get the colour change you're looking for. If the buttons are asp buttons then you can possibly just change the background colour element of the button as required.

As for the specific steps, not knowing specifically how you've coded your connection or your buttons I can't help with how you should code the above loop.

Hope this helps :) Please mark as solved when your issue is resolved.

Edit: As stated in the blurb above, PLEASE enclose code in the provided code tags for formatting.

post C# code using Code block please

thnx every1 for uer valuable time and contents...as for c#page i didnt know the coding oit was empty with page load and other functions...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.