asp:DropDownList SelectedItem problem

  • Thread starter Thread starter jeffmagill
  • Start date Start date
J

jeffmagill

Ive stumbled into one of those infamous problems where something
stopped working for apparently no reason - in this case
MyDropDownList.SelectedItem.Value. Im not sure exactly which group this
should be posted in either so Im just trying general.

I have an asp:dropdownlist in a form that is loaded with records from a
database. Upon clicking a button, a subroutine SubmitHandler is called.
The problem is that no matter which entry in the dropdownlist is
selected when the form is submitted, the value that I am recieving in
the subroutine SubmitHandler is always the first item in the
dropdownlist.

Does anyone know what is wrong? Thanks in advance.

Jeff
 
Jeff,
Ive stumbled into one of those infamous problems where something
stopped working for apparently no reason - in this case
MyDropDownList.SelectedItem.Value. Im not sure exactly which group this
should be posted in either so Im just trying general.
You have in my opinions two options to choose from the three of the five
most active developper newsgroups (the other two are not direct dotnet)).

microsoft.public.dotnet.languages.vb
microsoft.public.dotnet.languages.csharp
microsoft.public.dotnet.framework.aspnet

If you don't use codebehind, than I would go to the last in the other
situation to one of the first two.
I have an asp:dropdownlist in a form that is loaded with records from a
database. Upon clicking a button, a subroutine SubmitHandler is called.
The problem is that no matter which entry in the dropdownlist is
selected when the form is submitted, the value that I am recieving in
the subroutine SubmitHandler is always the first item in the
dropdownlist.

This is almost forever a binding problem. (It is done to early or to late).

I hope this helps,

Cor
 
Back
Top