dropdownlist Question

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
 
W

William F. Robertson, Jr.

How are the ListItems getting into the DropDownList?

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


bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top