Click here to Skip to main content
16,019,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one listbox and one panel..and i want to display panel right side of listbox bt according to my code it display below of listbox so
my code:-

XML
<td class="style3" align="left">
            <asp:ListBox CssClass="lbutton-link" ID="lbcategory"
                runat="server" Rows="6" AutoPostBack="True"
                        onselectedindexchanged="lbcategory_SelectedIndexChanged">
              <%--<asp:ListItem >-----</asp:ListItem>--%>
            <asp:ListItem >Construction</asp:ListItem>
            <asp:ListItem>Oil and gas</asp:ListItem>
           <asp:ListItem>Hospitality </asp:ListItem>
            <asp:ListItem>Medical</asp:ListItem>
            <asp:ListItem>Garments</asp:ListItem>
            <asp:ListItem>IT</asp:ListItem>
            <asp:ListItem>Marine Ind</asp:ListItem>
            <asp:ListItem>Engineering</asp:ListItem>
            <asp:ListItem>Automobile Industry</asp:ListItem>
            <asp:ListItem>Printing Industry</asp:ListItem>
            <asp:ListItem>Power Plant</asp:ListItem>
            <asp:ListItem>Agriculture</asp:ListItem>
            <asp:ListItem>Banking and Finance </asp:ListItem>
             <asp:ListItem>Office Staff</asp:ListItem>

       </asp:ListBox>

                <asp:Panel ID="Panelconstruction" runat="server" BackColor="#99CCFF"
                        BorderColor="#99CCFF" Width="34%" Visible="False">


                    <asp:Repeater ID="inbox" runat="server">


                    <HeaderTemplate>
                    </HeaderTemplate>


                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Job_Name")%>'/>

                        <br />

                    </ItemTemplate>

                    <FooterTemplate>
                    </FooterTemplate>

                    </asp:Repeater>
                </asp:Panel>

              </td>


so help me how can i do this???????
Posted

Try:
HTML
<table>
  <tr>
     <td>
       Your listbox here
     </td>
     <td>
       Your panel here
     </td>
  </tr>
</table>


This UI will have listbox on left side and Panel on right side at same row level.
 
Share this answer
 
XML
<td class="style3" align="left">
                    <asp:ListBox CssClass="lbutton-link" ID="lbcategory" runat="server" Rows="6" AutoPostBack="True"
                        OnSelectedIndexChanged="lbcategory_SelectedIndexChanged">
                        <%--<asp:ListItem >-----</asp:ListItem>--%>
                        <asp:ListItem>Construction</asp:ListItem>
                        <asp:ListItem>Oil and gas</asp:ListItem>
                        <asp:ListItem>Hospitality </asp:ListItem>
                        <asp:ListItem>Medical</asp:ListItem>
                        <asp:ListItem>Garments</asp:ListItem>
                        <asp:ListItem>IT</asp:ListItem>
                        <asp:ListItem>Marine Ind</asp:ListItem>
                        <asp:ListItem>Engineering</asp:ListItem>
                        <asp:ListItem>Automobile Industry</asp:ListItem>
                        <asp:ListItem>Printing Industry</asp:ListItem>
                        <asp:ListItem>Power Plant</asp:ListItem>
                        <asp:ListItem>Agriculture</asp:ListItem>
                        <asp:ListItem>Banking and Finance </asp:ListItem>
                        <asp:ListItem>Office Staff</asp:ListItem>
                    </asp:ListBox>
                </td>
                <td>
                    <asp:Panel ID="Panelconstruction" runat="server" BackColor="#99CCFF" BorderColor="#99CCFF"
                        Width="34%" Visible="False">
                        <asp:Repeater ID="inbox" runat="server">
                            <HeaderTemplate>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Job_Name")%>' />
                                <br />
                            </ItemTemplate>
                            <FooterTemplate>
                            </FooterTemplate>
                        </asp:Repeater>
                    </asp:Panel>
                </td>
 
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