: : Hello. I am using ASP.Net to populate a dropdown list. I am quite new to the ASP.NET language. The resulting page source is the following. There is more around the list on the finished page, but I have simplified it for posting purposes. However, no list shows up. Can anybody tell me why?
: :
: :
: :
: : <html><body>
: : <form Runat="Server"><asp:DropDownList ID="cmbHP" Runat="Server">
: : <asp:ListItem Text="Any" />
: : <asp:ListItem Text="< 1" />
: : <asp:ListItem Text="1" />
: : <asp:ListItem Text="1.5" />
: : <asp:ListItem Text="2" />
: : <asp:ListItem Text="3" />
: : <asp:ListItem Text="5" />
: : <asp:ListItem Text="7.5" />
: : <asp:ListItem Text="10" />
: : <asp:ListItem Text="15" />
: : <asp:ListItem Text="20" />
: : <asp:ListItem Text="25" />
: : <asp:ListItem Text="30" />
: : <asp:ListItem Text="40" />
: : <asp:ListItem Text="50" />
: : <asp:ListItem Text="60" />
: : <asp:ListItem Text="75" />
: : <asp:ListItem Text="100" />
: : <asp:ListItem Text="125" />
: : <asp:ListItem Text="150" />
: : <asp:ListItem Text="200" />
: : <asp:ListItem Text="250" />
: : <asp:ListItem Text="300" />
: : <asp:ListItem Text="350" />
: : <asp:ListItem Text="400" />
: : <asp:ListItem Text="450" />
: : <asp:ListItem Text="500" />
: : <asp:ListItem Text="600" />
: : <asp:ListItem Text="700" />
: : <asp:ListItem Text="800" />
: : <asp:ListItem Text="900" />
: : <asp:ListItem Text="1000" />
: : <asp:ListItem Text="> 1000" />
: : </asp:DropDownList></form>
: :
: : </body></html>
: :
: :
:
:
: hello i tried this code and it works fine on a new aspx page.
:
:
:
:
yeah, I figured it out. I was creating this code dynamically, and sending it to the client at load, but it needs to be run server-side. It's my first go around with ASP.Net. It's working now...