472,122 Members | 1,414 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,122 software developers and data experts.

asp:DropDownList SelectedItem problem

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

Dec 20 '05 #1
2 1241
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
Dec 20 '05 #2
Thanks! Ill try in one of those.

Jeff

Dec 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Marius | last post: by
2 posts views Thread by amessimon | last post: by
1 post views Thread by Urmal Patel via .NET 247 | last post: by
7 posts views Thread by Lastie | last post: by
2 posts views Thread by HH | last post: by
1 post views Thread by Miguel Dias Moura | last post: by
2 posts views Thread by John Smith | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.