locked
how to make a list box longer? RRS feed

  • Question

  • User883395055 posted

    Hello,

      I am working with a web page and I need to make a list box longer.  The code on the aspx page only shows width.

    <td><Controls:DualSelect Runat="server" ID="dsUsers" LeftHeaderText="Available" LeftHeaderCssClass="form-label" RightHeaderText="Assigned" RightHeaderCssClass="form-label" ShowRtUpDn="False" ListWidth="275" /></td>

    The box is only 4 rows in length, how do i make it longer?

    thanks

    J
                                        

    Friday, September 11, 2020 12:09 PM

All replies

  • User409696431 posted

    You mention a listbox, but your code does not contain one.  What is "DualSelect"?

    Saturday, September 12, 2020 4:40 PM
  • User1535942433 posted

    Hi j.pittsburgh,

    <td><Controls:DualSelect Runat="server" ID="dsUsers" LeftHeaderText="Available" LeftHeaderCssClass="form-label" RightHeaderText="Assigned" RightHeaderCssClass="form-label" ShowRtUpDn="False" ListWidth="275" /></td>

    What is the DualSelect control?Where is your listbox?

    If you need to make listbox longer,you need to use listbox control and add rows property.Just like this:

    <asp:ListBox ID="ListBox1" runat="server" Rows="5">
                    <asp:ListItem>1</asp:ListItem>
                    <asp:ListItem>2</asp:ListItem>
                    <asp:ListItem>3</asp:ListItem>
                    <asp:ListItem>4</asp:ListItem>
                    <asp:ListItem>5</asp:ListItem>
                </asp:ListBox>

    Result:

    Best regards,

    Yijing Sun

    Monday, September 14, 2020 6:21 AM
  • User409696431 posted

    What does your code do?  Is this VB.net?

    We have no idea what frame_1 is, what Frame(myGUI) is, or what listbox_1.pack() does, etc..  What is Listbox()?

    Where is the actual code for the asp.net ListBox?

    Monday, November 16, 2020 10:29 PM