The case of the crazy reseting dropdowns :-( Please help!

S

Simon Harvey

Hi everyone,

I keep getting a problem with dropdownlist controls. It sounds really stupid,
but my app is screwed as long as this keeps happening.

It seems to spontaneously happen and then I cant fix it without rebuilding
the whole page from scratch! Not Fun. :-(

So whats happening is I have my dropdowns on the page. The user comes along
and selects an option, but when the user submits the page,. its as if nothing
was changed.
The dropdowns all reset themselves to the default values. No modified value
reaches the server so its not just a view state thing (I think).

So basically, my dropdowns just dont work. Bear in mind, that these were
all working perfectly before. I then do some trivial work to the page - adding
controls and the like, and the whole thing just buggers up!

Can anyone think whats happening here? What would cause dropdown controls
to just stop sending their values and reset themselves?

If anyone at all has even the stupidist suggestion I would be so grateful
if you could tell me cos this is getting really serious. Its supposed to
be live now!

:-(

Thanks to anyone who can help

Simon
 
G

Guest

Simon,
Do your dropdown controls have their AutoPostback property set to "true"?
This is required if you want a change by the user to cause a postback
and fire the SelectedIndexChanged event where you can handle the event.
Peter
 
B

blackstaronline.net

After the user submits the form, how are you getting the values from
the drop downs?

After the form is submitted does yourDropDown.SelectedValue = "" - or
the default value?

Have you tried Request.Form("youDropDown")? Does that still equal ""?

Can you reply back with some code for us?

Jeremy Reid
http://blackstaronline.net/hgtit
 
T

ThunderMusic

are you filling up your combobox each time the page loads? did you use "if
(!Page.IsPostBack)" is not, you should, it's probably your problem.

I hope it helps

ThunderMusic
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top