Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple asp:Listbox won't display

Status
Not open for further replies.

devRyan

Programmer
Sep 1, 2006
104
US
Hi all,

I'm having a problem getting a simple asp:listbox to display. I've got the following code:

Code:
<asp:ListBox ID="lstTest" runat="server" Width="150px" SelectionMode="Multiple">                
                <asp:ListItem>Test1</asp:ListItem>
                <asp:ListItem>Test2</asp:ListItem>
            </asp:ListBox>

I've also tried multiple permutations of attribute settings, and even tried to plug in sample code from the web, with no luck.

I'm using VS2005, and it's provided ASP.NET Development Server for testing, which so far seems to be working just fine.

When the page loads, everything is as should be, except the listbox is just an empty listbox frame, about 5px high, it seems to be taking the width property fine, but the row property makes no change to the way it displays.

The generated HTML is as follows, which appears to be fine:
Code:
<select size="4" name="ctl00$MainContent$lstTest" multiple="multiple" id="ctl00_MainContent_lstTest" style="width:150px;">
	<option value="Test1">Test1</option>
	<option value="Test2">Test2</option>

</select>

Thanks for any help in advance.

Ryan
 
This is the classic ASP forum - try forum855

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top