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
SimonSimon,
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
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Simon Harvey" wrote:
> 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
>
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
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
"Simon Harvey" <nothanks@dotnet.itags.org.hotmail.com> wrote in message
news:94a1890869bf8c8038d5030666f@dotnet.itags.org.news.microsoft.co m...
> 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
0 comments:
Post a Comment