dropdownlist Question

  • Thread starter Thread starter chongo
  • Start date Start date
C

chongo

Hi,

I'm a newbie to asp.net. Actually i'm working on my first page now.

I have a drop list <asp:DropDownList id="menu" AutoPostBack="True"
OnSelectedIndexChanged="onChange" runat="server">

The problem that I am having is when I call my onChange Method, the
dropdown list selects the proper index but overides the selected value
to 0.

<select name="menu" id="nenuButton" SelectedIndexChanged="onChange"
onchange="__doPostBack('menuButton','')" language="javascript">
<option value="0">None</option>
<option value="21">beer</option>

==> <option selected="selected" value="0">pizza</option>

<option value="23">Ret</option>
<option value="2">Sandwiches</option>
</select>

Any help would be greatly appreciated.
-dan
 
How are the ListItems getting into the DropDownList?

This looks like you have copied the html code from a rendered aspx page.


bill
 
Back
Top